@google-cloud/discoveryengine 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +51 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +54 -3
  4. package/build/protos/google/cloud/discoveryengine/v1/completion.proto +52 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +51 -4
  6. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +3 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +40 -1
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +98 -0
  9. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +304 -0
  10. package/build/protos/google/cloud/discoveryengine/v1/document.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +215 -0
  12. package/build/protos/google/cloud/discoveryengine/v1/engine_service.proto +242 -0
  13. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +64 -0
  14. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +38 -0
  15. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +137 -4
  16. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +170 -0
  17. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +691 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +3 -3
  19. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +59 -8
  20. package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +52 -0
  21. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +51 -4
  22. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +3 -0
  23. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +40 -1
  24. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +98 -0
  25. package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +306 -0
  26. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
  27. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +220 -0
  28. package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +244 -0
  29. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +64 -0
  30. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +38 -0
  31. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +26 -3
  32. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +150 -11
  33. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +264 -0
  34. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +147 -0
  35. package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +170 -0
  36. package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto +695 -0
  37. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -3
  38. package/build/protos/protos.d.ts +41157 -23655
  39. package/build/protos/protos.js +103188 -62466
  40. package/build/protos/protos.json +10400 -6075
  41. package/build/src/index.d.ts +10 -1
  42. package/build/src/index.js +10 -1
  43. package/build/src/v1/completion_service_client.d.ts +489 -7
  44. package/build/src/v1/completion_service_client.js +715 -11
  45. package/build/src/v1/completion_service_client_config.json +10 -0
  46. package/build/src/v1/conversational_search_service_client.d.ts +341 -3
  47. package/build/src/v1/conversational_search_service_client.js +466 -9
  48. package/build/src/v1/data_store_service_client.d.ts +1286 -0
  49. package/build/src/v1/data_store_service_client.js +1768 -0
  50. package/build/src/v1/data_store_service_client_config.json +46 -0
  51. package/build/src/v1/document_service_client.d.ts +347 -2
  52. package/build/src/v1/document_service_client.js +506 -9
  53. package/build/src/v1/engine_service_client.d.ts +1211 -0
  54. package/build/src/v1/engine_service_client.js +1731 -0
  55. package/build/src/v1/engine_service_client_config.json +46 -0
  56. package/build/src/v1/index.d.ts +3 -0
  57. package/build/src/v1/index.js +7 -1
  58. package/build/src/v1/schema_service_client.d.ts +272 -2
  59. package/build/src/v1/schema_service_client.js +402 -9
  60. package/build/src/v1/search_service_client.d.ts +515 -11
  61. package/build/src/v1/search_service_client.js +648 -15
  62. package/build/src/v1/site_search_engine_service_client.d.ts +1564 -0
  63. package/build/src/v1/site_search_engine_service_client.js +2075 -0
  64. package/build/src/v1/site_search_engine_service_client_config.json +74 -0
  65. package/build/src/v1/user_event_service_client.d.ts +272 -2
  66. package/build/src/v1/user_event_service_client.js +402 -9
  67. package/build/src/v1alpha/completion_service_client.d.ts +11 -2
  68. package/build/src/v1alpha/completion_service_client.js +37 -10
  69. package/build/src/v1alpha/conversational_search_service_client.d.ts +11 -2
  70. package/build/src/v1alpha/conversational_search_service_client.js +37 -10
  71. package/build/src/v1alpha/data_store_service_client.d.ts +11 -2
  72. package/build/src/v1alpha/data_store_service_client.js +37 -10
  73. package/build/src/v1alpha/document_service_client.d.ts +11 -2
  74. package/build/src/v1alpha/document_service_client.js +37 -10
  75. package/build/src/v1alpha/engine_service_client.d.ts +11 -2
  76. package/build/src/v1alpha/engine_service_client.js +37 -10
  77. package/build/src/v1alpha/index.js +1 -1
  78. package/build/src/v1alpha/recommendation_service_client.d.ts +11 -2
  79. package/build/src/v1alpha/recommendation_service_client.js +37 -10
  80. package/build/src/v1alpha/schema_service_client.d.ts +11 -2
  81. package/build/src/v1alpha/schema_service_client.js +37 -10
  82. package/build/src/v1alpha/search_service_client.d.ts +11 -2
  83. package/build/src/v1alpha/search_service_client.js +37 -10
  84. package/build/src/v1alpha/search_tuning_service_client.d.ts +11 -2
  85. package/build/src/v1alpha/search_tuning_service_client.js +37 -10
  86. package/build/src/v1alpha/site_search_engine_service_client.d.ts +11 -2
  87. package/build/src/v1alpha/site_search_engine_service_client.js +37 -10
  88. package/build/src/v1alpha/user_event_service_client.d.ts +11 -2
  89. package/build/src/v1alpha/user_event_service_client.js +37 -10
  90. package/build/src/v1beta/completion_service_client.d.ts +633 -7
  91. package/build/src/v1beta/completion_service_client.js +911 -11
  92. package/build/src/v1beta/completion_service_client_config.json +10 -0
  93. package/build/src/v1beta/conversational_search_service_client.d.ts +341 -3
  94. package/build/src/v1beta/conversational_search_service_client.js +466 -9
  95. package/build/src/v1beta/data_store_service_client.d.ts +1433 -0
  96. package/build/src/v1beta/data_store_service_client.js +1966 -0
  97. package/build/src/v1beta/data_store_service_client_config.json +46 -0
  98. package/build/src/v1beta/document_service_client.d.ts +491 -2
  99. package/build/src/v1beta/document_service_client.js +706 -11
  100. package/build/src/v1beta/engine_service_client.d.ts +1357 -0
  101. package/build/src/v1beta/engine_service_client.js +1928 -0
  102. package/build/src/v1beta/engine_service_client_config.json +46 -0
  103. package/build/src/v1beta/index.d.ts +4 -0
  104. package/build/src/v1beta/index.js +9 -1
  105. package/build/src/v1beta/recommendation_service_client.d.ts +420 -5
  106. package/build/src/v1beta/recommendation_service_client.js +570 -9
  107. package/build/src/v1beta/schema_service_client.d.ts +416 -2
  108. package/build/src/v1beta/schema_service_client.js +602 -11
  109. package/build/src/v1beta/search_service_client.d.ts +539 -29
  110. package/build/src/v1beta/search_service_client.js +664 -27
  111. package/build/src/v1beta/serving_config_service_client.d.ts +1102 -0
  112. package/build/src/v1beta/serving_config_service_client.js +1563 -0
  113. package/build/src/v1beta/serving_config_service_client_config.json +38 -0
  114. package/build/src/v1beta/site_search_engine_service_client.d.ts +1712 -0
  115. package/build/src/v1beta/site_search_engine_service_client.js +2271 -0
  116. package/build/src/v1beta/site_search_engine_service_client_config.json +74 -0
  117. package/build/src/v1beta/user_event_service_client.d.ts +416 -2
  118. package/build/src/v1beta/user_event_service_client.js +602 -11
  119. package/package.json +2 -2
@@ -72,7 +72,7 @@ class CompletionServiceClient {
72
72
  * ```
73
73
  */
74
74
  constructor(opts, gaxInstance) {
75
- var _a, _b;
75
+ var _a, _b, _c, _d;
76
76
  this._terminated = false;
77
77
  this.descriptors = {
78
78
  page: {},
@@ -82,16 +82,24 @@ class CompletionServiceClient {
82
82
  };
83
83
  // Ensure that options include all the required fields.
84
84
  const staticMembers = this.constructor;
85
- const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
85
+ if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
86
+ (opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
87
+ (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
88
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
89
+ }
90
+ this._universeDomain =
91
+ (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
92
+ this._servicePath = 'discoveryengine.' + this._universeDomain;
93
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
86
94
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
87
95
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
88
- const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
89
- const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
96
+ const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
97
+ const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
90
98
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
91
99
  // Request numeric enum values if REST transport is used.
92
100
  opts.numericEnums = true;
93
101
  // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
94
- if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
102
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
95
103
  opts['scopes'] = staticMembers.scopes;
96
104
  }
97
105
  // Load google-gax module synchronously if needed
@@ -109,9 +117,9 @@ class CompletionServiceClient {
109
117
  // Set useJWTAccessWithScope on the auth object.
110
118
  this.auth.useJWTAccessWithScope = true;
111
119
  // Set defaultServicePath on the auth object.
112
- this.auth.defaultServicePath = staticMembers.servicePath;
120
+ this.auth.defaultServicePath = this._servicePath;
113
121
  // Set the default scopes in auth client if needed.
114
- if (servicePath === staticMembers.servicePath) {
122
+ if (servicePath === this._servicePath) {
115
123
  this.auth.defaultScopes = staticMembers.scopes;
116
124
  }
117
125
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
@@ -138,14 +146,129 @@ class CompletionServiceClient {
138
146
  // identifiers to uniquely identify resources within the API.
139
147
  // Create useful helper objects for these.
140
148
  this.pathTemplates = {
149
+ enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
141
150
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
142
151
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
143
152
  projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
144
153
  projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
154
+ projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
155
+ projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
156
+ projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
157
+ projectLocationCollectionEngineConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}'),
158
+ projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
145
159
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
146
160
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
147
161
  projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
148
162
  projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
163
+ projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
164
+ projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
165
+ projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
166
+ };
167
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
168
+ // This API contains "long-running operations", which return a
169
+ // an Operation object that allows for tracking of the operation,
170
+ // rather than holding a request open.
171
+ const lroOptions = {
172
+ auth: this.auth,
173
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
174
+ };
175
+ if (opts.fallback) {
176
+ lroOptions.protoJson = protoFilesRoot;
177
+ lroOptions.httpRules = [
178
+ {
179
+ selector: 'google.longrunning.Operations.GetOperation',
180
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
181
+ additional_bindings: [
182
+ {
183
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
184
+ },
185
+ {
186
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
187
+ },
188
+ {
189
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
190
+ },
191
+ {
192
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
193
+ },
194
+ {
195
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
196
+ },
197
+ {
198
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
199
+ },
200
+ {
201
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
202
+ },
203
+ {
204
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
205
+ },
206
+ {
207
+ get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
208
+ },
209
+ {
210
+ get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
211
+ },
212
+ {
213
+ get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
214
+ },
215
+ { get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
216
+ { get: '/v1beta/{name=projects/*/operations/*}' },
217
+ ],
218
+ },
219
+ {
220
+ selector: 'google.longrunning.Operations.ListOperations',
221
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
222
+ additional_bindings: [
223
+ {
224
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
225
+ },
226
+ {
227
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
228
+ },
229
+ {
230
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
231
+ },
232
+ {
233
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
234
+ },
235
+ {
236
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
237
+ },
238
+ {
239
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
240
+ },
241
+ {
242
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
243
+ },
244
+ {
245
+ get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
246
+ },
247
+ {
248
+ get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
249
+ },
250
+ {
251
+ get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
252
+ },
253
+ {
254
+ get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
255
+ },
256
+ { get: '/v1beta/{name=projects/*/locations/*}/operations' },
257
+ { get: '/v1beta/{name=projects/*}/operations' },
258
+ ],
259
+ },
260
+ ];
261
+ }
262
+ this.operationsClient = this._gaxModule
263
+ .lro(lroOptions)
264
+ .operationsClient(opts);
265
+ const importSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse');
266
+ const importSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetadata');
267
+ const purgeSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse');
268
+ const purgeSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata');
269
+ this.descriptors.longrunning = {
270
+ importSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSuggestionDenyListEntriesResponse.decode.bind(importSuggestionDenyListEntriesResponse), importSuggestionDenyListEntriesMetadata.decode.bind(importSuggestionDenyListEntriesMetadata)),
271
+ purgeSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeSuggestionDenyListEntriesResponse.decode.bind(purgeSuggestionDenyListEntriesResponse), purgeSuggestionDenyListEntriesMetadata.decode.bind(purgeSuggestionDenyListEntriesMetadata)),
149
272
  };
150
273
  // Put together the default options sent with requests.
151
274
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.CompletionService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -181,7 +304,11 @@ class CompletionServiceClient {
181
304
  .CompletionService, this._opts, this._providedCustomServicePath);
182
305
  // Iterate over each of the methods that the service provides
183
306
  // and create an API call method for each.
184
- const completionServiceStubMethods = ['completeQuery'];
307
+ const completionServiceStubMethods = [
308
+ 'completeQuery',
309
+ 'importSuggestionDenyListEntries',
310
+ 'purgeSuggestionDenyListEntries',
311
+ ];
185
312
  for (const methodName of completionServiceStubMethods) {
186
313
  const callPromise = this.completionServiceStub.then(stub => (...args) => {
187
314
  if (this._terminated) {
@@ -192,7 +319,7 @@ class CompletionServiceClient {
192
319
  }, (err) => () => {
193
320
  throw err;
194
321
  });
195
- const descriptor = undefined;
322
+ const descriptor = this.descriptors.longrunning[methodName] || undefined;
196
323
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
197
324
  this.innerApiCalls[methodName] = apiCall;
198
325
  }
@@ -200,19 +327,38 @@ class CompletionServiceClient {
200
327
  }
201
328
  /**
202
329
  * The DNS address for this API service.
330
+ * @deprecated Use the apiEndpoint method of the client instance.
203
331
  * @returns {string} The DNS address for this service.
204
332
  */
205
333
  static get servicePath() {
334
+ if (typeof process !== undefined &&
335
+ typeof process.emitWarning === 'function') {
336
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
337
+ }
206
338
  return 'discoveryengine.googleapis.com';
207
339
  }
208
340
  /**
209
- * The DNS address for this API service - same as servicePath(),
210
- * exists for compatibility reasons.
341
+ * The DNS address for this API service - same as servicePath.
342
+ * @deprecated Use the apiEndpoint method of the client instance.
211
343
  * @returns {string} The DNS address for this service.
212
344
  */
213
345
  static get apiEndpoint() {
346
+ if (typeof process !== undefined &&
347
+ typeof process.emitWarning === 'function') {
348
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
349
+ }
214
350
  return 'discoveryengine.googleapis.com';
215
351
  }
352
+ /**
353
+ * The DNS address for this API service.
354
+ * @returns {string} The DNS address for this service.
355
+ */
356
+ get apiEndpoint() {
357
+ return this._servicePath;
358
+ }
359
+ get universeDomain() {
360
+ return this._universeDomain;
361
+ }
216
362
  /**
217
363
  * The port for this API service.
218
364
  * @returns {number} The default port for this service.
@@ -260,6 +406,82 @@ class CompletionServiceClient {
260
406
  this.initialize();
261
407
  return this.innerApiCalls.completeQuery(request, options, callback);
262
408
  }
409
+ importSuggestionDenyListEntries(request, optionsOrCallback, callback) {
410
+ var _a;
411
+ request = request || {};
412
+ let options;
413
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
414
+ callback = optionsOrCallback;
415
+ options = {};
416
+ }
417
+ else {
418
+ options = optionsOrCallback;
419
+ }
420
+ options = options || {};
421
+ options.otherArgs = options.otherArgs || {};
422
+ options.otherArgs.headers = options.otherArgs.headers || {};
423
+ options.otherArgs.headers['x-goog-request-params'] =
424
+ this._gaxModule.routingHeader.fromParams({
425
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
426
+ });
427
+ this.initialize();
428
+ return this.innerApiCalls.importSuggestionDenyListEntries(request, options, callback);
429
+ }
430
+ /**
431
+ * Check the status of the long running operation returned by `importSuggestionDenyListEntries()`.
432
+ * @param {String} name
433
+ * The operation name that will be passed.
434
+ * @returns {Promise} - The promise which resolves to an object.
435
+ * The decoded operation object has result and metadata field to get information from.
436
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
437
+ * for more details and examples.
438
+ * @example <caption>include:samples/generated/v1beta/completion_service.import_suggestion_deny_list_entries.js</caption>
439
+ * region_tag:discoveryengine_v1beta_generated_CompletionService_ImportSuggestionDenyListEntries_async
440
+ */
441
+ async checkImportSuggestionDenyListEntriesProgress(name) {
442
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
443
+ const [operation] = await this.operationsClient.getOperation(request);
444
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importSuggestionDenyListEntries, this._gaxModule.createDefaultBackoffSettings());
445
+ return decodeOperation;
446
+ }
447
+ purgeSuggestionDenyListEntries(request, optionsOrCallback, callback) {
448
+ var _a;
449
+ request = request || {};
450
+ let options;
451
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
452
+ callback = optionsOrCallback;
453
+ options = {};
454
+ }
455
+ else {
456
+ options = optionsOrCallback;
457
+ }
458
+ options = options || {};
459
+ options.otherArgs = options.otherArgs || {};
460
+ options.otherArgs.headers = options.otherArgs.headers || {};
461
+ options.otherArgs.headers['x-goog-request-params'] =
462
+ this._gaxModule.routingHeader.fromParams({
463
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
464
+ });
465
+ this.initialize();
466
+ return this.innerApiCalls.purgeSuggestionDenyListEntries(request, options, callback);
467
+ }
468
+ /**
469
+ * Check the status of the long running operation returned by `purgeSuggestionDenyListEntries()`.
470
+ * @param {String} name
471
+ * The operation name that will be passed.
472
+ * @returns {Promise} - The promise which resolves to an object.
473
+ * The decoded operation object has result and metadata field to get information from.
474
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
475
+ * for more details and examples.
476
+ * @example <caption>include:samples/generated/v1beta/completion_service.purge_suggestion_deny_list_entries.js</caption>
477
+ * region_tag:discoveryengine_v1beta_generated_CompletionService_PurgeSuggestionDenyListEntries_async
478
+ */
479
+ async checkPurgeSuggestionDenyListEntriesProgress(name) {
480
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
481
+ const [operation] = await this.operationsClient.getOperation(request);
482
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.purgeSuggestionDenyListEntries, this._gaxModule.createDefaultBackoffSettings());
483
+ return decodeOperation;
484
+ }
263
485
  /**
264
486
  * Gets information about a location.
265
487
  *
@@ -315,9 +537,194 @@ class CompletionServiceClient {
315
537
  listLocationsAsync(request, options) {
316
538
  return this.locationsClient.listLocationsAsync(request, options);
317
539
  }
540
+ /**
541
+ * Gets the latest state of a long-running operation. Clients can use this
542
+ * method to poll the operation result at intervals as recommended by the API
543
+ * service.
544
+ *
545
+ * @param {Object} request - The request object that will be sent.
546
+ * @param {string} request.name - The name of the operation resource.
547
+ * @param {Object=} options
548
+ * Optional parameters. You can override the default settings for this call,
549
+ * e.g, timeout, retries, paginations, etc. See {@link
550
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
551
+ * for the details.
552
+ * @param {function(?Error, ?Object)=} callback
553
+ * The function which will be called with the result of the API call.
554
+ *
555
+ * The second parameter to the callback is an object representing
556
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
557
+ * @return {Promise} - The promise which resolves to an array.
558
+ * The first element of the array is an object representing
559
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
560
+ * The promise has a method named "cancel" which cancels the ongoing API call.
561
+ *
562
+ * @example
563
+ * ```
564
+ * const client = longrunning.operationsClient();
565
+ * const name = '';
566
+ * const [response] = await client.getOperation({name});
567
+ * // doThingsWith(response)
568
+ * ```
569
+ */
570
+ getOperation(request, options, callback) {
571
+ return this.operationsClient.getOperation(request, options, callback);
572
+ }
573
+ /**
574
+ * Lists operations that match the specified filter in the request. If the
575
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
576
+ *
577
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
578
+ *
579
+ * @param {Object} request - The request object that will be sent.
580
+ * @param {string} request.name - The name of the operation collection.
581
+ * @param {string} request.filter - The standard list filter.
582
+ * @param {number=} request.pageSize -
583
+ * The maximum number of resources contained in the underlying API
584
+ * response. If page streaming is performed per-resource, this
585
+ * parameter does not affect the return value. If page streaming is
586
+ * performed per-page, this determines the maximum number of
587
+ * resources in a page.
588
+ * @param {Object=} options
589
+ * Optional parameters. You can override the default settings for this call,
590
+ * e.g, timeout, retries, paginations, etc. See {@link
591
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
592
+ * details.
593
+ * @returns {Object}
594
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
595
+ *
596
+ * @example
597
+ * ```
598
+ * const client = longrunning.operationsClient();
599
+ * for await (const response of client.listOperationsAsync(request));
600
+ * // doThingsWith(response)
601
+ * ```
602
+ */
603
+ listOperationsAsync(request, options) {
604
+ return this.operationsClient.listOperationsAsync(request, options);
605
+ }
606
+ /**
607
+ * Starts asynchronous cancellation on a long-running operation. The server
608
+ * makes a best effort to cancel the operation, but success is not
609
+ * guaranteed. If the server doesn't support this method, it returns
610
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
611
+ * {@link Operations.GetOperation} or
612
+ * other methods to check whether the cancellation succeeded or whether the
613
+ * operation completed despite cancellation. On successful cancellation,
614
+ * the operation is not deleted; instead, it becomes an operation with
615
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
616
+ * 1, corresponding to `Code.CANCELLED`.
617
+ *
618
+ * @param {Object} request - The request object that will be sent.
619
+ * @param {string} request.name - The name of the operation resource to be cancelled.
620
+ * @param {Object=} options
621
+ * Optional parameters. You can override the default settings for this call,
622
+ * e.g, timeout, retries, paginations, etc. See {@link
623
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
624
+ * details.
625
+ * @param {function(?Error)=} callback
626
+ * The function which will be called with the result of the API call.
627
+ * @return {Promise} - The promise which resolves when API call finishes.
628
+ * The promise has a method named "cancel" which cancels the ongoing API
629
+ * call.
630
+ *
631
+ * @example
632
+ * ```
633
+ * const client = longrunning.operationsClient();
634
+ * await client.cancelOperation({name: ''});
635
+ * ```
636
+ */
637
+ cancelOperation(request, options, callback) {
638
+ return this.operationsClient.cancelOperation(request, options, callback);
639
+ }
640
+ /**
641
+ * Deletes a long-running operation. This method indicates that the client is
642
+ * no longer interested in the operation result. It does not cancel the
643
+ * operation. If the server doesn't support this method, it returns
644
+ * `google.rpc.Code.UNIMPLEMENTED`.
645
+ *
646
+ * @param {Object} request - The request object that will be sent.
647
+ * @param {string} request.name - The name of the operation resource to be deleted.
648
+ * @param {Object=} options
649
+ * Optional parameters. You can override the default settings for this call,
650
+ * e.g, timeout, retries, paginations, etc. See {@link
651
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
652
+ * for the details.
653
+ * @param {function(?Error)=} callback
654
+ * The function which will be called with the result of the API call.
655
+ * @return {Promise} - The promise which resolves when API call finishes.
656
+ * The promise has a method named "cancel" which cancels the ongoing API
657
+ * call.
658
+ *
659
+ * @example
660
+ * ```
661
+ * const client = longrunning.operationsClient();
662
+ * await client.deleteOperation({name: ''});
663
+ * ```
664
+ */
665
+ deleteOperation(request, options, callback) {
666
+ return this.operationsClient.deleteOperation(request, options, callback);
667
+ }
318
668
  // --------------------
319
669
  // -- Path templates --
320
670
  // --------------------
671
+ /**
672
+ * Return a fully-qualified engine resource name string.
673
+ *
674
+ * @param {string} project
675
+ * @param {string} location
676
+ * @param {string} collection
677
+ * @param {string} engine
678
+ * @returns {string} Resource name string.
679
+ */
680
+ enginePath(project, location, collection, engine) {
681
+ return this.pathTemplates.enginePathTemplate.render({
682
+ project: project,
683
+ location: location,
684
+ collection: collection,
685
+ engine: engine,
686
+ });
687
+ }
688
+ /**
689
+ * Parse the project from Engine resource.
690
+ *
691
+ * @param {string} engineName
692
+ * A fully-qualified path representing Engine resource.
693
+ * @returns {string} A string representing the project.
694
+ */
695
+ matchProjectFromEngineName(engineName) {
696
+ return this.pathTemplates.enginePathTemplate.match(engineName).project;
697
+ }
698
+ /**
699
+ * Parse the location from Engine resource.
700
+ *
701
+ * @param {string} engineName
702
+ * A fully-qualified path representing Engine resource.
703
+ * @returns {string} A string representing the location.
704
+ */
705
+ matchLocationFromEngineName(engineName) {
706
+ return this.pathTemplates.enginePathTemplate.match(engineName).location;
707
+ }
708
+ /**
709
+ * Parse the collection from Engine resource.
710
+ *
711
+ * @param {string} engineName
712
+ * A fully-qualified path representing Engine resource.
713
+ * @returns {string} A string representing the collection.
714
+ */
715
+ matchCollectionFromEngineName(engineName) {
716
+ return this.pathTemplates.enginePathTemplate.match(engineName).collection;
717
+ }
718
+ /**
719
+ * Parse the engine from Engine resource.
720
+ *
721
+ * @param {string} engineName
722
+ * A fully-qualified path representing Engine resource.
723
+ * @returns {string} A string representing the engine.
724
+ */
725
+ matchEngineFromEngineName(engineName) {
726
+ return this.pathTemplates.enginePathTemplate.match(engineName).engine;
727
+ }
321
728
  /**
322
729
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
323
730
  *
@@ -594,6 +1001,339 @@ class CompletionServiceClient {
594
1001
  matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
595
1002
  return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
596
1003
  }
1004
+ /**
1005
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
1006
+ *
1007
+ * @param {string} project
1008
+ * @param {string} location
1009
+ * @param {string} collection
1010
+ * @param {string} data_store
1011
+ * @param {string} serving_config
1012
+ * @returns {string} Resource name string.
1013
+ */
1014
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
1015
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
1016
+ project: project,
1017
+ location: location,
1018
+ collection: collection,
1019
+ data_store: dataStore,
1020
+ serving_config: servingConfig,
1021
+ });
1022
+ }
1023
+ /**
1024
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
1025
+ *
1026
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1027
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1028
+ * @returns {string} A string representing the project.
1029
+ */
1030
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1031
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
1032
+ }
1033
+ /**
1034
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
1035
+ *
1036
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1037
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1038
+ * @returns {string} A string representing the location.
1039
+ */
1040
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1041
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
1042
+ }
1043
+ /**
1044
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
1045
+ *
1046
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1047
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1048
+ * @returns {string} A string representing the collection.
1049
+ */
1050
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1051
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
1052
+ }
1053
+ /**
1054
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
1055
+ *
1056
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1057
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1058
+ * @returns {string} A string representing the data_store.
1059
+ */
1060
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1061
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
1062
+ }
1063
+ /**
1064
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
1065
+ *
1066
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1067
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1068
+ * @returns {string} A string representing the serving_config.
1069
+ */
1070
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1071
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
1072
+ }
1073
+ /**
1074
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngine resource name string.
1075
+ *
1076
+ * @param {string} project
1077
+ * @param {string} location
1078
+ * @param {string} collection
1079
+ * @param {string} data_store
1080
+ * @returns {string} Resource name string.
1081
+ */
1082
+ projectLocationCollectionDataStoreSiteSearchEnginePath(project, location, collection, dataStore) {
1083
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render({
1084
+ project: project,
1085
+ location: location,
1086
+ collection: collection,
1087
+ data_store: dataStore,
1088
+ });
1089
+ }
1090
+ /**
1091
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1092
+ *
1093
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1094
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1095
+ * @returns {string} A string representing the project.
1096
+ */
1097
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1098
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).project;
1099
+ }
1100
+ /**
1101
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1102
+ *
1103
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1104
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1105
+ * @returns {string} A string representing the location.
1106
+ */
1107
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1108
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).location;
1109
+ }
1110
+ /**
1111
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1112
+ *
1113
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1114
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1115
+ * @returns {string} A string representing the collection.
1116
+ */
1117
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1118
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).collection;
1119
+ }
1120
+ /**
1121
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1122
+ *
1123
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1124
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1125
+ * @returns {string} A string representing the data_store.
1126
+ */
1127
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1128
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
1129
+ }
1130
+ /**
1131
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
1132
+ *
1133
+ * @param {string} project
1134
+ * @param {string} location
1135
+ * @param {string} collection
1136
+ * @param {string} data_store
1137
+ * @param {string} target_site
1138
+ * @returns {string} Resource name string.
1139
+ */
1140
+ projectLocationCollectionDataStoreSiteSearchEngineTargetSitePath(project, location, collection, dataStore, targetSite) {
1141
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render({
1142
+ project: project,
1143
+ location: location,
1144
+ collection: collection,
1145
+ data_store: dataStore,
1146
+ target_site: targetSite,
1147
+ });
1148
+ }
1149
+ /**
1150
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1151
+ *
1152
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1153
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1154
+ * @returns {string} A string representing the project.
1155
+ */
1156
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1157
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).project;
1158
+ }
1159
+ /**
1160
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1161
+ *
1162
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1163
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1164
+ * @returns {string} A string representing the location.
1165
+ */
1166
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1167
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).location;
1168
+ }
1169
+ /**
1170
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1171
+ *
1172
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1173
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1174
+ * @returns {string} A string representing the collection.
1175
+ */
1176
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1177
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).collection;
1178
+ }
1179
+ /**
1180
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1181
+ *
1182
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1183
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1184
+ * @returns {string} A string representing the data_store.
1185
+ */
1186
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1187
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).data_store;
1188
+ }
1189
+ /**
1190
+ * Parse the target_site from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1191
+ *
1192
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1193
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1194
+ * @returns {string} A string representing the target_site.
1195
+ */
1196
+ matchTargetSiteFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1197
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).target_site;
1198
+ }
1199
+ /**
1200
+ * Return a fully-qualified projectLocationCollectionEngineConversation resource name string.
1201
+ *
1202
+ * @param {string} project
1203
+ * @param {string} location
1204
+ * @param {string} collection
1205
+ * @param {string} engine
1206
+ * @param {string} conversation
1207
+ * @returns {string} Resource name string.
1208
+ */
1209
+ projectLocationCollectionEngineConversationPath(project, location, collection, engine, conversation) {
1210
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render({
1211
+ project: project,
1212
+ location: location,
1213
+ collection: collection,
1214
+ engine: engine,
1215
+ conversation: conversation,
1216
+ });
1217
+ }
1218
+ /**
1219
+ * Parse the project from ProjectLocationCollectionEngineConversation resource.
1220
+ *
1221
+ * @param {string} projectLocationCollectionEngineConversationName
1222
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1223
+ * @returns {string} A string representing the project.
1224
+ */
1225
+ matchProjectFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1226
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).project;
1227
+ }
1228
+ /**
1229
+ * Parse the location from ProjectLocationCollectionEngineConversation resource.
1230
+ *
1231
+ * @param {string} projectLocationCollectionEngineConversationName
1232
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1233
+ * @returns {string} A string representing the location.
1234
+ */
1235
+ matchLocationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1236
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).location;
1237
+ }
1238
+ /**
1239
+ * Parse the collection from ProjectLocationCollectionEngineConversation resource.
1240
+ *
1241
+ * @param {string} projectLocationCollectionEngineConversationName
1242
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1243
+ * @returns {string} A string representing the collection.
1244
+ */
1245
+ matchCollectionFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1246
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).collection;
1247
+ }
1248
+ /**
1249
+ * Parse the engine from ProjectLocationCollectionEngineConversation resource.
1250
+ *
1251
+ * @param {string} projectLocationCollectionEngineConversationName
1252
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1253
+ * @returns {string} A string representing the engine.
1254
+ */
1255
+ matchEngineFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1256
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).engine;
1257
+ }
1258
+ /**
1259
+ * Parse the conversation from ProjectLocationCollectionEngineConversation resource.
1260
+ *
1261
+ * @param {string} projectLocationCollectionEngineConversationName
1262
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1263
+ * @returns {string} A string representing the conversation.
1264
+ */
1265
+ matchConversationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1266
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).conversation;
1267
+ }
1268
+ /**
1269
+ * Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
1270
+ *
1271
+ * @param {string} project
1272
+ * @param {string} location
1273
+ * @param {string} collection
1274
+ * @param {string} engine
1275
+ * @param {string} serving_config
1276
+ * @returns {string} Resource name string.
1277
+ */
1278
+ projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
1279
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
1280
+ project: project,
1281
+ location: location,
1282
+ collection: collection,
1283
+ engine: engine,
1284
+ serving_config: servingConfig,
1285
+ });
1286
+ }
1287
+ /**
1288
+ * Parse the project from ProjectLocationCollectionEngineServingConfig resource.
1289
+ *
1290
+ * @param {string} projectLocationCollectionEngineServingConfigName
1291
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1292
+ * @returns {string} A string representing the project.
1293
+ */
1294
+ matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1295
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
1296
+ }
1297
+ /**
1298
+ * Parse the location from ProjectLocationCollectionEngineServingConfig resource.
1299
+ *
1300
+ * @param {string} projectLocationCollectionEngineServingConfigName
1301
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1302
+ * @returns {string} A string representing the location.
1303
+ */
1304
+ matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1305
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
1306
+ }
1307
+ /**
1308
+ * Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
1309
+ *
1310
+ * @param {string} projectLocationCollectionEngineServingConfigName
1311
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1312
+ * @returns {string} A string representing the collection.
1313
+ */
1314
+ matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1315
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
1316
+ }
1317
+ /**
1318
+ * Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
1319
+ *
1320
+ * @param {string} projectLocationCollectionEngineServingConfigName
1321
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1322
+ * @returns {string} A string representing the engine.
1323
+ */
1324
+ matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1325
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
1326
+ }
1327
+ /**
1328
+ * Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
1329
+ *
1330
+ * @param {string} projectLocationCollectionEngineServingConfigName
1331
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1332
+ * @returns {string} A string representing the serving_config.
1333
+ */
1334
+ matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1335
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
1336
+ }
597
1337
  /**
598
1338
  * Return a fully-qualified projectLocationDataStore resource name string.
599
1339
  *
@@ -822,6 +1562,165 @@ class CompletionServiceClient {
822
1562
  matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
823
1563
  return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
824
1564
  }
1565
+ /**
1566
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
1567
+ *
1568
+ * @param {string} project
1569
+ * @param {string} location
1570
+ * @param {string} data_store
1571
+ * @param {string} serving_config
1572
+ * @returns {string} Resource name string.
1573
+ */
1574
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
1575
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
1576
+ project: project,
1577
+ location: location,
1578
+ data_store: dataStore,
1579
+ serving_config: servingConfig,
1580
+ });
1581
+ }
1582
+ /**
1583
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
1584
+ *
1585
+ * @param {string} projectLocationDataStoreServingConfigName
1586
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1587
+ * @returns {string} A string representing the project.
1588
+ */
1589
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1590
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
1591
+ }
1592
+ /**
1593
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
1594
+ *
1595
+ * @param {string} projectLocationDataStoreServingConfigName
1596
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1597
+ * @returns {string} A string representing the location.
1598
+ */
1599
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1600
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
1601
+ }
1602
+ /**
1603
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
1604
+ *
1605
+ * @param {string} projectLocationDataStoreServingConfigName
1606
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1607
+ * @returns {string} A string representing the data_store.
1608
+ */
1609
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1610
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
1611
+ }
1612
+ /**
1613
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
1614
+ *
1615
+ * @param {string} projectLocationDataStoreServingConfigName
1616
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1617
+ * @returns {string} A string representing the serving_config.
1618
+ */
1619
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1620
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
1621
+ }
1622
+ /**
1623
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngine resource name string.
1624
+ *
1625
+ * @param {string} project
1626
+ * @param {string} location
1627
+ * @param {string} data_store
1628
+ * @returns {string} Resource name string.
1629
+ */
1630
+ projectLocationDataStoreSiteSearchEnginePath(project, location, dataStore) {
1631
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render({
1632
+ project: project,
1633
+ location: location,
1634
+ data_store: dataStore,
1635
+ });
1636
+ }
1637
+ /**
1638
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngine resource.
1639
+ *
1640
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1641
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1642
+ * @returns {string} A string representing the project.
1643
+ */
1644
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1645
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).project;
1646
+ }
1647
+ /**
1648
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngine resource.
1649
+ *
1650
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1651
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1652
+ * @returns {string} A string representing the location.
1653
+ */
1654
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1655
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).location;
1656
+ }
1657
+ /**
1658
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngine resource.
1659
+ *
1660
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1661
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1662
+ * @returns {string} A string representing the data_store.
1663
+ */
1664
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1665
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
1666
+ }
1667
+ /**
1668
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
1669
+ *
1670
+ * @param {string} project
1671
+ * @param {string} location
1672
+ * @param {string} data_store
1673
+ * @param {string} target_site
1674
+ * @returns {string} Resource name string.
1675
+ */
1676
+ projectLocationDataStoreSiteSearchEngineTargetSitePath(project, location, dataStore, targetSite) {
1677
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render({
1678
+ project: project,
1679
+ location: location,
1680
+ data_store: dataStore,
1681
+ target_site: targetSite,
1682
+ });
1683
+ }
1684
+ /**
1685
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1686
+ *
1687
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1688
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1689
+ * @returns {string} A string representing the project.
1690
+ */
1691
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1692
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).project;
1693
+ }
1694
+ /**
1695
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1696
+ *
1697
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1698
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1699
+ * @returns {string} A string representing the location.
1700
+ */
1701
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1702
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).location;
1703
+ }
1704
+ /**
1705
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1706
+ *
1707
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1708
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1709
+ * @returns {string} A string representing the data_store.
1710
+ */
1711
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1712
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).data_store;
1713
+ }
1714
+ /**
1715
+ * Parse the target_site from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1716
+ *
1717
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1718
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1719
+ * @returns {string} A string representing the target_site.
1720
+ */
1721
+ matchTargetSiteFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1722
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).target_site;
1723
+ }
825
1724
  /**
826
1725
  * Terminate the gRPC channel and close the client.
827
1726
  *
@@ -834,6 +1733,7 @@ class CompletionServiceClient {
834
1733
  this._terminated = true;
835
1734
  stub.close();
836
1735
  this.locationsClient.close();
1736
+ this.operationsClient.close();
837
1737
  });
838
1738
  }
839
1739
  return Promise.resolve();