@google-cloud/discoveryengine 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +13 -0
  2. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
  4. package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
  9. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
  10. package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
  11. package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
  12. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
  13. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
  14. package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
  15. package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
  16. package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
  17. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
  19. package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
  21. package/build/protos/protos.d.ts +5415 -578
  22. package/build/protos/protos.js +77830 -63391
  23. package/build/protos/protos.json +1537 -92
  24. package/build/src/index.d.ts +10 -1
  25. package/build/src/index.js +8 -22
  26. package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
  27. package/build/src/v1/cmek_config_service_client.js +3274 -0
  28. package/build/src/v1/cmek_config_service_client_config.json +42 -0
  29. package/build/src/v1/cmek_config_service_proto_list.json +44 -0
  30. package/build/src/v1/completion_service_client.d.ts +166 -76
  31. package/build/src/v1/completion_service_client.js +258 -263
  32. package/build/src/v1/completion_service_proto_list.json +6 -1
  33. package/build/src/v1/control_service_client.d.ts +171 -81
  34. package/build/src/v1/control_service_client.js +246 -132
  35. package/build/src/v1/control_service_proto_list.json +6 -1
  36. package/build/src/v1/conversational_search_service_client.d.ts +233 -143
  37. package/build/src/v1/conversational_search_service_client.js +330 -226
  38. package/build/src/v1/conversational_search_service_proto_list.json +6 -1
  39. package/build/src/v1/data_store_service_client.d.ts +218 -122
  40. package/build/src/v1/data_store_service_client.js +273 -281
  41. package/build/src/v1/data_store_service_proto_list.json +6 -1
  42. package/build/src/v1/document_service_client.d.ts +210 -120
  43. package/build/src/v1/document_service_client.js +300 -301
  44. package/build/src/v1/document_service_proto_list.json +6 -1
  45. package/build/src/v1/engine_service_client.d.ts +193 -103
  46. package/build/src/v1/engine_service_client.js +273 -280
  47. package/build/src/v1/engine_service_proto_list.json +6 -1
  48. package/build/src/v1/gapic_metadata.json +184 -0
  49. package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
  50. package/build/src/v1/grounded_generation_service_client.js +217 -100
  51. package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
  52. package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
  53. package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
  54. package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
  55. package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -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/project_service_client.d.ts +166 -76
  59. package/build/src/v1/project_service_client.js +235 -223
  60. package/build/src/v1/project_service_proto_list.json +6 -1
  61. package/build/src/v1/rank_service_client.d.ts +137 -47
  62. package/build/src/v1/rank_service_client.js +204 -85
  63. package/build/src/v1/rank_service_proto_list.json +6 -1
  64. package/build/src/v1/recommendation_service_client.d.ts +137 -47
  65. package/build/src/v1/recommendation_service_client.js +202 -82
  66. package/build/src/v1/recommendation_service_proto_list.json +6 -1
  67. package/build/src/v1/schema_service_client.d.ts +201 -111
  68. package/build/src/v1/schema_service_client.js +264 -274
  69. package/build/src/v1/schema_service_proto_list.json +6 -1
  70. package/build/src/v1/search_service_client.d.ts +661 -571
  71. package/build/src/v1/search_service_client.js +216 -113
  72. package/build/src/v1/search_service_proto_list.json +6 -1
  73. package/build/src/v1/search_tuning_service_client.d.ts +167 -77
  74. package/build/src/v1/search_tuning_service_client.js +246 -236
  75. package/build/src/v1/search_tuning_service_proto_list.json +6 -1
  76. package/build/src/v1/serving_config_service_client.d.ts +138 -48
  77. package/build/src/v1/serving_config_service_client.js +201 -80
  78. package/build/src/v1/serving_config_service_proto_list.json +6 -1
  79. package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
  80. package/build/src/v1/site_search_engine_service_client.js +324 -379
  81. package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
  82. package/build/src/v1/user_event_service_client.d.ts +167 -77
  83. package/build/src/v1/user_event_service_client.js +260 -254
  84. package/build/src/v1/user_event_service_proto_list.json +6 -1
  85. package/build/src/v1/user_license_service_client.d.ts +2256 -0
  86. package/build/src/v1/user_license_service_client.js +3194 -0
  87. package/build/src/v1/user_license_service_client_config.json +34 -0
  88. package/build/src/v1/user_license_service_proto_list.json +44 -0
  89. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  90. package/build/src/v1alpha/acl_config_service_client.js +94 -106
  91. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  92. package/build/src/v1alpha/chunk_service_client.js +98 -120
  93. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  94. package/build/src/v1alpha/completion_service_client.js +141 -281
  95. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  96. package/build/src/v1alpha/control_service_client.js +129 -151
  97. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  98. package/build/src/v1alpha/conversational_search_service_client.js +211 -237
  99. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  100. package/build/src/v1alpha/data_store_service_client.js +176 -317
  101. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  102. package/build/src/v1alpha/document_service_client.js +193 -329
  103. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  104. package/build/src/v1alpha/engine_service_client.js +180 -326
  105. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  106. package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
  107. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  108. package/build/src/v1alpha/evaluation_service_client.js +150 -296
  109. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  110. package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
  111. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  112. package/build/src/v1alpha/project_service_client.js +139 -263
  113. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  114. package/build/src/v1alpha/rank_service_client.js +87 -104
  115. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  116. package/build/src/v1alpha/recommendation_service_client.js +85 -100
  117. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  118. package/build/src/v1alpha/sample_query_service_client.js +169 -302
  119. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  120. package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
  121. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  122. package/build/src/v1alpha/schema_service_client.js +147 -293
  123. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  124. package/build/src/v1alpha/search_service_client.js +88 -112
  125. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  126. package/build/src/v1alpha/search_tuning_service_client.js +129 -254
  127. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  128. package/build/src/v1alpha/serving_config_service_client.js +109 -133
  129. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  130. package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
  131. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  132. package/build/src/v1alpha/user_event_service_client.js +143 -272
  133. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  134. package/build/src/v1beta/completion_service_client.js +149 -280
  135. package/build/src/v1beta/control_service_client.d.ts +84 -84
  136. package/build/src/v1beta/control_service_client.js +127 -147
  137. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  138. package/build/src/v1beta/conversational_search_service_client.js +209 -233
  139. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  140. package/build/src/v1beta/data_store_service_client.js +154 -289
  141. package/build/src/v1beta/document_service_client.d.ts +124 -124
  142. package/build/src/v1beta/document_service_client.js +181 -310
  143. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  144. package/build/src/v1beta/engine_service_client.js +178 -316
  145. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  146. package/build/src/v1beta/evaluation_service_client.js +148 -286
  147. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  148. package/build/src/v1beta/grounded_generation_service_client.js +98 -114
  149. package/build/src/v1beta/project_service_client.d.ts +76 -76
  150. package/build/src/v1beta/project_service_client.js +116 -232
  151. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  152. package/build/src/v1beta/rank_service_client.js +85 -99
  153. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  154. package/build/src/v1beta/recommendation_service_client.js +83 -96
  155. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  156. package/build/src/v1beta/sample_query_service_client.js +167 -292
  157. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  158. package/build/src/v1beta/sample_query_set_service_client.js +128 -149
  159. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  160. package/build/src/v1beta/schema_service_client.js +145 -283
  161. package/build/src/v1beta/search_service_client.d.ts +665 -665
  162. package/build/src/v1beta/search_service_client.js +97 -128
  163. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  164. package/build/src/v1beta/search_tuning_service_client.js +127 -244
  165. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  166. package/build/src/v1beta/serving_config_service_client.js +107 -129
  167. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  168. package/build/src/v1beta/site_search_engine_service_client.js +205 -387
  169. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  170. package/build/src/v1beta/user_event_service_client.js +141 -262
  171. package/package.json +7 -7
  172. package/CHANGELOG.md +0 -267
@@ -98,26 +98,17 @@ class CompletionServiceClient {
98
98
  constructor(opts, gaxInstance) {
99
99
  // Ensure that options include all the required fields.
100
100
  const staticMembers = this.constructor;
101
- if (opts?.universe_domain &&
102
- opts?.universeDomain &&
103
- opts?.universe_domain !== opts?.universeDomain) {
101
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
104
102
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
105
103
  }
106
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
107
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
108
- : undefined;
109
- this._universeDomain =
110
- opts?.universeDomain ??
111
- opts?.universe_domain ??
112
- universeDomainEnvVar ??
113
- 'googleapis.com';
104
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
105
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
114
106
  this._servicePath = 'discoveryengine.' + this._universeDomain;
115
107
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
116
108
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
117
109
  const port = opts?.port || staticMembers.port;
118
110
  const clientConfig = opts?.clientConfig ?? {};
119
- const fallback = opts?.fallback ??
120
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
111
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
121
112
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
122
113
  // Request numeric enum values if REST transport is used.
123
114
  opts.numericEnums = true;
@@ -147,7 +138,10 @@ class CompletionServiceClient {
147
138
  }
148
139
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
149
140
  // Determine the client header string.
150
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
141
+ const clientHeader = [
142
+ `gax/${this._gaxModule.version}`,
143
+ `gapic/${version}`,
144
+ ];
151
145
  if (typeof process === 'object' && 'versions' in process) {
152
146
  clientHeader.push(`gl-node/${process.versions.node}`);
153
147
  }
@@ -170,7 +164,10 @@ class CompletionServiceClient {
170
164
  // Create useful helper objects for these.
171
165
  this.pathTemplates = {
172
166
  enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
167
+ identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
173
168
  projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
169
+ projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
170
+ projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
174
171
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
175
172
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
176
173
  projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
@@ -205,127 +202,22 @@ class CompletionServiceClient {
205
202
  projectLocationDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
206
203
  projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
207
204
  };
208
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
205
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
209
206
  // This API contains "long-running operations", which return a
210
207
  // an Operation object that allows for tracking of the operation,
211
208
  // rather than holding a request open.
212
209
  const lroOptions = {
213
210
  auth: this.auth,
214
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
211
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
215
212
  };
216
213
  if (opts.fallback) {
217
214
  lroOptions.protoJson = protoFilesRoot;
218
- lroOptions.httpRules = [
219
- {
220
- selector: 'google.longrunning.Operations.CancelOperation',
221
- post: '/v1/{name=projects/*/operations/*}:cancel',
222
- body: '*',
223
- additional_bindings: [
224
- {
225
- post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
226
- body: '*',
227
- },
228
- {
229
- post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
230
- body: '*',
231
- },
232
- ],
233
- },
234
- {
235
- selector: 'google.longrunning.Operations.GetOperation',
236
- get: '/v1/{name=projects/*/operations/*}',
237
- additional_bindings: [
238
- {
239
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
240
- },
241
- {
242
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
243
- },
244
- {
245
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
246
- },
247
- {
248
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
249
- },
250
- {
251
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
252
- },
253
- {
254
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
255
- },
256
- {
257
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
258
- },
259
- {
260
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
261
- },
262
- {
263
- get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
264
- },
265
- {
266
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
267
- },
268
- {
269
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
270
- },
271
- {
272
- get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
273
- },
274
- {
275
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
276
- },
277
- { get: '/v1/{name=projects/*/locations/*/operations/*}' },
278
- { get: '/v1/{name=projects/*/operations/*}' },
279
- ],
280
- },
281
- {
282
- selector: 'google.longrunning.Operations.ListOperations',
283
- get: '/v1/{name=projects/*}/operations',
284
- additional_bindings: [
285
- {
286
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
287
- },
288
- {
289
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
290
- },
291
- {
292
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
293
- },
294
- {
295
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
296
- },
297
- {
298
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
299
- },
300
- {
301
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
302
- },
303
- {
304
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
305
- },
306
- {
307
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
308
- },
309
- { get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
310
- {
311
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
312
- },
313
- {
314
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
315
- },
316
- { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
317
- {
318
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
319
- },
320
- { get: '/v1/{name=projects/*/locations/*}/operations' },
321
- { get: '/v1/{name=projects/*}/operations' },
322
- ],
323
- },
324
- ];
215
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1/{name=projects/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}:cancel', body: '*', }, { post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
216
+ }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=projects/*/operations/*}', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}', }, { get: '/v1/{name=projects/*/locations/*/operations/*}', }, { get: '/v1/{name=projects/*/operations/*}', }],
217
+ }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1/{name=projects/*}/operations', additional_bindings: [{ get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations', }, { get: '/v1/{name=projects/*/locations/*}/operations', }, { get: '/v1/{name=projects/*}/operations', }],
218
+ }];
325
219
  }
326
- this.operationsClient = this._gaxModule
327
- .lro(lroOptions)
328
- .operationsClient(opts);
220
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
329
221
  const importSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesResponse');
330
222
  const importSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportSuggestionDenyListEntriesMetadata');
331
223
  const purgeSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesResponse');
@@ -338,7 +230,7 @@ class CompletionServiceClient {
338
230
  importSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSuggestionDenyListEntriesResponse.decode.bind(importSuggestionDenyListEntriesResponse), importSuggestionDenyListEntriesMetadata.decode.bind(importSuggestionDenyListEntriesMetadata)),
339
231
  purgeSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeSuggestionDenyListEntriesResponse.decode.bind(purgeSuggestionDenyListEntriesResponse), purgeSuggestionDenyListEntriesMetadata.decode.bind(purgeSuggestionDenyListEntriesMetadata)),
340
232
  importCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importCompletionSuggestionsResponse.decode.bind(importCompletionSuggestionsResponse), importCompletionSuggestionsMetadata.decode.bind(importCompletionSuggestionsMetadata)),
341
- purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeCompletionSuggestionsResponse.decode.bind(purgeCompletionSuggestionsResponse), purgeCompletionSuggestionsMetadata.decode.bind(purgeCompletionSuggestionsMetadata)),
233
+ purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeCompletionSuggestionsResponse.decode.bind(purgeCompletionSuggestionsResponse), purgeCompletionSuggestionsMetadata.decode.bind(purgeCompletionSuggestionsMetadata))
342
234
  };
343
235
  // Put together the default options sent with requests.
344
236
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.CompletionService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -367,20 +259,13 @@ class CompletionServiceClient {
367
259
  }
368
260
  // Put together the "service stub" for
369
261
  // google.cloud.discoveryengine.v1.CompletionService.
370
- this.completionServiceStub = this._gaxGrpc.createStub(this._opts.fallback
371
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.CompletionService')
372
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
373
- this._protos.google.cloud.discoveryengine.v1
374
- .CompletionService, this._opts, this._providedCustomServicePath);
262
+ this.completionServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
263
+ this._protos.lookupService('google.cloud.discoveryengine.v1.CompletionService') :
264
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
265
+ this._protos.google.cloud.discoveryengine.v1.CompletionService, this._opts, this._providedCustomServicePath);
375
266
  // Iterate over each of the methods that the service provides
376
267
  // and create an API call method for each.
377
- const completionServiceStubMethods = [
378
- 'completeQuery',
379
- 'importSuggestionDenyListEntries',
380
- 'purgeSuggestionDenyListEntries',
381
- 'importCompletionSuggestions',
382
- 'purgeCompletionSuggestions',
383
- ];
268
+ const completionServiceStubMethods = ['completeQuery', 'importSuggestionDenyListEntries', 'purgeSuggestionDenyListEntries', 'importCompletionSuggestions', 'purgeCompletionSuggestions'];
384
269
  for (const methodName of completionServiceStubMethods) {
385
270
  const callPromise = this.completionServiceStub.then(stub => (...args) => {
386
271
  if (this._terminated) {
@@ -391,7 +276,8 @@ class CompletionServiceClient {
391
276
  }, (err) => () => {
392
277
  throw err;
393
278
  });
394
- const descriptor = this.descriptors.longrunning[methodName] || undefined;
279
+ const descriptor = this.descriptors.longrunning[methodName] ||
280
+ undefined;
395
281
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
396
282
  this.innerApiCalls[methodName] = apiCall;
397
283
  }
@@ -403,8 +289,7 @@ class CompletionServiceClient {
403
289
  * @returns {string} The DNS address for this service.
404
290
  */
405
291
  static get servicePath() {
406
- if (typeof process === 'object' &&
407
- typeof process.emitWarning === 'function') {
292
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
408
293
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
409
294
  }
410
295
  return 'discoveryengine.googleapis.com';
@@ -415,8 +300,7 @@ class CompletionServiceClient {
415
300
  * @returns {string} The DNS address for this service.
416
301
  */
417
302
  static get apiEndpoint() {
418
- if (typeof process === 'object' &&
419
- typeof process.emitWarning === 'function') {
303
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
420
304
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
421
305
  }
422
306
  return 'discoveryengine.googleapis.com';
@@ -444,7 +328,9 @@ class CompletionServiceClient {
444
328
  * @returns {string[]} List of default scopes.
445
329
  */
446
330
  static get scopes() {
447
- return ['https://www.googleapis.com/auth/cloud-platform'];
331
+ return [
332
+ 'https://www.googleapis.com/auth/cloud-platform'
333
+ ];
448
334
  }
449
335
  /**
450
336
  * Return the project ID used by this class.
@@ -470,13 +356,10 @@ class CompletionServiceClient {
470
356
  options = options || {};
471
357
  options.otherArgs = options.otherArgs || {};
472
358
  options.otherArgs.headers = options.otherArgs.headers || {};
473
- options.otherArgs.headers['x-goog-request-params'] =
474
- this._gaxModule.routingHeader.fromParams({
475
- data_store: request.dataStore ?? '',
476
- });
477
- this.initialize().catch(err => {
478
- throw err;
359
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
360
+ 'data_store': request.dataStore ?? '',
479
361
  });
362
+ this.initialize().catch(err => { throw err; });
480
363
  this._log.info('completeQuery request %j', request);
481
364
  const wrappedCallback = callback
482
365
  ? (error, response, options, rawResponse) => {
@@ -484,11 +367,16 @@ class CompletionServiceClient {
484
367
  callback(error, response, options, rawResponse); // We verified callback above.
485
368
  }
486
369
  : undefined;
487
- return this.innerApiCalls
488
- .completeQuery(request, options, wrappedCallback)
370
+ return this.innerApiCalls.completeQuery(request, options, wrappedCallback)
489
371
  ?.then(([response, options, rawResponse]) => {
490
372
  this._log.info('completeQuery response %j', response);
491
373
  return [response, options, rawResponse];
374
+ }).catch((error) => {
375
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
376
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
377
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
378
+ }
379
+ throw error;
492
380
  });
493
381
  }
494
382
  importSuggestionDenyListEntries(request, optionsOrCallback, callback) {
@@ -504,13 +392,10 @@ class CompletionServiceClient {
504
392
  options = options || {};
505
393
  options.otherArgs = options.otherArgs || {};
506
394
  options.otherArgs.headers = options.otherArgs.headers || {};
507
- options.otherArgs.headers['x-goog-request-params'] =
508
- this._gaxModule.routingHeader.fromParams({
509
- parent: request.parent ?? '',
510
- });
511
- this.initialize().catch(err => {
512
- throw err;
395
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
396
+ 'parent': request.parent ?? '',
513
397
  });
398
+ this.initialize().catch(err => { throw err; });
514
399
  const wrappedCallback = callback
515
400
  ? (error, response, rawResponse, _) => {
516
401
  this._log.info('importSuggestionDenyListEntries response %j', rawResponse);
@@ -518,8 +403,7 @@ class CompletionServiceClient {
518
403
  }
519
404
  : undefined;
520
405
  this._log.info('importSuggestionDenyListEntries request %j', request);
521
- return this.innerApiCalls
522
- .importSuggestionDenyListEntries(request, options, wrappedCallback)
406
+ return this.innerApiCalls.importSuggestionDenyListEntries(request, options, wrappedCallback)
523
407
  ?.then(([response, rawResponse, _]) => {
524
408
  this._log.info('importSuggestionDenyListEntries response %j', rawResponse);
525
409
  return [response, rawResponse, _];
@@ -556,13 +440,10 @@ class CompletionServiceClient {
556
440
  options = options || {};
557
441
  options.otherArgs = options.otherArgs || {};
558
442
  options.otherArgs.headers = options.otherArgs.headers || {};
559
- options.otherArgs.headers['x-goog-request-params'] =
560
- this._gaxModule.routingHeader.fromParams({
561
- parent: request.parent ?? '',
562
- });
563
- this.initialize().catch(err => {
564
- throw err;
443
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
444
+ 'parent': request.parent ?? '',
565
445
  });
446
+ this.initialize().catch(err => { throw err; });
566
447
  const wrappedCallback = callback
567
448
  ? (error, response, rawResponse, _) => {
568
449
  this._log.info('purgeSuggestionDenyListEntries response %j', rawResponse);
@@ -570,8 +451,7 @@ class CompletionServiceClient {
570
451
  }
571
452
  : undefined;
572
453
  this._log.info('purgeSuggestionDenyListEntries request %j', request);
573
- return this.innerApiCalls
574
- .purgeSuggestionDenyListEntries(request, options, wrappedCallback)
454
+ return this.innerApiCalls.purgeSuggestionDenyListEntries(request, options, wrappedCallback)
575
455
  ?.then(([response, rawResponse, _]) => {
576
456
  this._log.info('purgeSuggestionDenyListEntries response %j', rawResponse);
577
457
  return [response, rawResponse, _];
@@ -608,13 +488,10 @@ class CompletionServiceClient {
608
488
  options = options || {};
609
489
  options.otherArgs = options.otherArgs || {};
610
490
  options.otherArgs.headers = options.otherArgs.headers || {};
611
- options.otherArgs.headers['x-goog-request-params'] =
612
- this._gaxModule.routingHeader.fromParams({
613
- parent: request.parent ?? '',
614
- });
615
- this.initialize().catch(err => {
616
- throw err;
491
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
492
+ 'parent': request.parent ?? '',
617
493
  });
494
+ this.initialize().catch(err => { throw err; });
618
495
  const wrappedCallback = callback
619
496
  ? (error, response, rawResponse, _) => {
620
497
  this._log.info('importCompletionSuggestions response %j', rawResponse);
@@ -622,8 +499,7 @@ class CompletionServiceClient {
622
499
  }
623
500
  : undefined;
624
501
  this._log.info('importCompletionSuggestions request %j', request);
625
- return this.innerApiCalls
626
- .importCompletionSuggestions(request, options, wrappedCallback)
502
+ return this.innerApiCalls.importCompletionSuggestions(request, options, wrappedCallback)
627
503
  ?.then(([response, rawResponse, _]) => {
628
504
  this._log.info('importCompletionSuggestions response %j', rawResponse);
629
505
  return [response, rawResponse, _];
@@ -660,13 +536,10 @@ class CompletionServiceClient {
660
536
  options = options || {};
661
537
  options.otherArgs = options.otherArgs || {};
662
538
  options.otherArgs.headers = options.otherArgs.headers || {};
663
- options.otherArgs.headers['x-goog-request-params'] =
664
- this._gaxModule.routingHeader.fromParams({
665
- parent: request.parent ?? '',
666
- });
667
- this.initialize().catch(err => {
668
- throw err;
539
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
540
+ 'parent': request.parent ?? '',
669
541
  });
542
+ this.initialize().catch(err => { throw err; });
670
543
  const wrappedCallback = callback
671
544
  ? (error, response, rawResponse, _) => {
672
545
  this._log.info('purgeCompletionSuggestions response %j', rawResponse);
@@ -674,8 +547,7 @@ class CompletionServiceClient {
674
547
  }
675
548
  : undefined;
676
549
  this._log.info('purgeCompletionSuggestions request %j', request);
677
- return this.innerApiCalls
678
- .purgeCompletionSuggestions(request, options, wrappedCallback)
550
+ return this.innerApiCalls.purgeCompletionSuggestions(request, options, wrappedCallback)
679
551
  ?.then(([response, rawResponse, _]) => {
680
552
  this._log.info('purgeCompletionSuggestions response %j', rawResponse);
681
553
  return [response, rawResponse, _];
@@ -700,90 +572,90 @@ class CompletionServiceClient {
700
572
  return decodeOperation;
701
573
  }
702
574
  /**
703
- * Gets information about a location.
704
- *
705
- * @param {Object} request
706
- * The request object that will be sent.
707
- * @param {string} request.name
708
- * Resource name for the location.
709
- * @param {object} [options]
710
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
711
- * @returns {Promise} - The promise which resolves to an array.
712
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
713
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
714
- * for more details and examples.
715
- * @example
716
- * ```
717
- * const [response] = await client.getLocation(request);
718
- * ```
719
- */
575
+ * Gets information about a location.
576
+ *
577
+ * @param {Object} request
578
+ * The request object that will be sent.
579
+ * @param {string} request.name
580
+ * Resource name for the location.
581
+ * @param {object} [options]
582
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
583
+ * @returns {Promise} - The promise which resolves to an array.
584
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
585
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
586
+ * for more details and examples.
587
+ * @example
588
+ * ```
589
+ * const [response] = await client.getLocation(request);
590
+ * ```
591
+ */
720
592
  getLocation(request, options, callback) {
721
593
  return this.locationsClient.getLocation(request, options, callback);
722
594
  }
723
595
  /**
724
- * Lists information about the supported locations for this service. Returns an iterable object.
725
- *
726
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
727
- * @param {Object} request
728
- * The request object that will be sent.
729
- * @param {string} request.name
730
- * The resource that owns the locations collection, if applicable.
731
- * @param {string} request.filter
732
- * The standard list filter.
733
- * @param {number} request.pageSize
734
- * The standard list page size.
735
- * @param {string} request.pageToken
736
- * The standard list page token.
737
- * @param {object} [options]
738
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
739
- * @returns {Object}
740
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
741
- * When you iterate the returned iterable, each element will be an object representing
742
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
743
- * so you can stop the iteration when you don't need more results.
744
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
745
- * for more details and examples.
746
- * @example
747
- * ```
748
- * const iterable = client.listLocationsAsync(request);
749
- * for await (const response of iterable) {
750
- * // process response
751
- * }
752
- * ```
753
- */
596
+ * Lists information about the supported locations for this service. Returns an iterable object.
597
+ *
598
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
599
+ * @param {Object} request
600
+ * The request object that will be sent.
601
+ * @param {string} request.name
602
+ * The resource that owns the locations collection, if applicable.
603
+ * @param {string} request.filter
604
+ * The standard list filter.
605
+ * @param {number} request.pageSize
606
+ * The standard list page size.
607
+ * @param {string} request.pageToken
608
+ * The standard list page token.
609
+ * @param {object} [options]
610
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
611
+ * @returns {Object}
612
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
613
+ * When you iterate the returned iterable, each element will be an object representing
614
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
615
+ * so you can stop the iteration when you don't need more results.
616
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
617
+ * for more details and examples.
618
+ * @example
619
+ * ```
620
+ * const iterable = client.listLocationsAsync(request);
621
+ * for await (const response of iterable) {
622
+ * // process response
623
+ * }
624
+ * ```
625
+ */
754
626
  listLocationsAsync(request, options) {
755
627
  return this.locationsClient.listLocationsAsync(request, options);
756
628
  }
757
629
  /**
758
- * Gets the latest state of a long-running operation. Clients can use this
759
- * method to poll the operation result at intervals as recommended by the API
760
- * service.
761
- *
762
- * @param {Object} request - The request object that will be sent.
763
- * @param {string} request.name - The name of the operation resource.
764
- * @param {Object=} options
765
- * Optional parameters. You can override the default settings for this call,
766
- * e.g, timeout, retries, paginations, etc. See {@link
767
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
768
- * for the details.
769
- * @param {function(?Error, ?Object)=} callback
770
- * The function which will be called with the result of the API call.
771
- *
772
- * The second parameter to the callback is an object representing
773
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
774
- * @return {Promise} - The promise which resolves to an array.
775
- * The first element of the array is an object representing
776
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
777
- * The promise has a method named "cancel" which cancels the ongoing API call.
778
- *
779
- * @example
780
- * ```
781
- * const client = longrunning.operationsClient();
782
- * const name = '';
783
- * const [response] = await client.getOperation({name});
784
- * // doThingsWith(response)
785
- * ```
786
- */
630
+ * Gets the latest state of a long-running operation. Clients can use this
631
+ * method to poll the operation result at intervals as recommended by the API
632
+ * service.
633
+ *
634
+ * @param {Object} request - The request object that will be sent.
635
+ * @param {string} request.name - The name of the operation resource.
636
+ * @param {Object=} options
637
+ * Optional parameters. You can override the default settings for this call,
638
+ * e.g, timeout, retries, paginations, etc. See {@link
639
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
640
+ * for the details.
641
+ * @param {function(?Error, ?Object)=} callback
642
+ * The function which will be called with the result of the API call.
643
+ *
644
+ * The second parameter to the callback is an object representing
645
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
646
+ * @return {Promise} - The promise which resolves to an array.
647
+ * The first element of the array is an object representing
648
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
649
+ * The promise has a method named "cancel" which cancels the ongoing API call.
650
+ *
651
+ * @example
652
+ * ```
653
+ * const client = longrunning.operationsClient();
654
+ * const name = '';
655
+ * const [response] = await client.getOperation({name});
656
+ * // doThingsWith(response)
657
+ * ```
658
+ */
787
659
  getOperation(request, optionsOrCallback, callback) {
788
660
  let options;
789
661
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -994,6 +866,51 @@ class CompletionServiceClient {
994
866
  matchEngineFromEngineName(engineName) {
995
867
  return this.pathTemplates.enginePathTemplate.match(engineName).engine;
996
868
  }
869
+ /**
870
+ * Return a fully-qualified identityMappingStore resource name string.
871
+ *
872
+ * @param {string} project
873
+ * @param {string} location
874
+ * @param {string} identity_mapping_store
875
+ * @returns {string} Resource name string.
876
+ */
877
+ identityMappingStorePath(project, location, identityMappingStore) {
878
+ return this.pathTemplates.identityMappingStorePathTemplate.render({
879
+ project: project,
880
+ location: location,
881
+ identity_mapping_store: identityMappingStore,
882
+ });
883
+ }
884
+ /**
885
+ * Parse the project from IdentityMappingStore resource.
886
+ *
887
+ * @param {string} identityMappingStoreName
888
+ * A fully-qualified path representing IdentityMappingStore resource.
889
+ * @returns {string} A string representing the project.
890
+ */
891
+ matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
892
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
893
+ }
894
+ /**
895
+ * Parse the location from IdentityMappingStore resource.
896
+ *
897
+ * @param {string} identityMappingStoreName
898
+ * A fully-qualified path representing IdentityMappingStore resource.
899
+ * @returns {string} A string representing the location.
900
+ */
901
+ matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
902
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
903
+ }
904
+ /**
905
+ * Parse the identity_mapping_store from IdentityMappingStore resource.
906
+ *
907
+ * @param {string} identityMappingStoreName
908
+ * A fully-qualified path representing IdentityMappingStore resource.
909
+ * @returns {string} A string representing the identity_mapping_store.
910
+ */
911
+ matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
912
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
913
+ }
997
914
  /**
998
915
  * Return a fully-qualified project resource name string.
999
916
  *
@@ -1015,6 +932,84 @@ class CompletionServiceClient {
1015
932
  matchProjectFromProjectName(projectName) {
1016
933
  return this.pathTemplates.projectPathTemplate.match(projectName).project;
1017
934
  }
935
+ /**
936
+ * Return a fully-qualified projectLocationCmekConfig resource name string.
937
+ *
938
+ * @param {string} project
939
+ * @param {string} location
940
+ * @returns {string} Resource name string.
941
+ */
942
+ projectLocationCmekConfigPath(project, location) {
943
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
944
+ project: project,
945
+ location: location,
946
+ });
947
+ }
948
+ /**
949
+ * Parse the project from ProjectLocationCmekConfig resource.
950
+ *
951
+ * @param {string} projectLocationCmekConfigName
952
+ * A fully-qualified path representing project_location_cmekConfig resource.
953
+ * @returns {string} A string representing the project.
954
+ */
955
+ matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
956
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
957
+ }
958
+ /**
959
+ * Parse the location from ProjectLocationCmekConfig resource.
960
+ *
961
+ * @param {string} projectLocationCmekConfigName
962
+ * A fully-qualified path representing project_location_cmekConfig resource.
963
+ * @returns {string} A string representing the location.
964
+ */
965
+ matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
966
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
967
+ }
968
+ /**
969
+ * Return a fully-qualified projectLocationCmekConfigs resource name string.
970
+ *
971
+ * @param {string} project
972
+ * @param {string} location
973
+ * @param {string} cmek_config
974
+ * @returns {string} Resource name string.
975
+ */
976
+ projectLocationCmekConfigsPath(project, location, cmekConfig) {
977
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
978
+ project: project,
979
+ location: location,
980
+ cmek_config: cmekConfig,
981
+ });
982
+ }
983
+ /**
984
+ * Parse the project from ProjectLocationCmekConfigs resource.
985
+ *
986
+ * @param {string} projectLocationCmekConfigsName
987
+ * A fully-qualified path representing project_location_cmekConfigs resource.
988
+ * @returns {string} A string representing the project.
989
+ */
990
+ matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
991
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
992
+ }
993
+ /**
994
+ * Parse the location from ProjectLocationCmekConfigs resource.
995
+ *
996
+ * @param {string} projectLocationCmekConfigsName
997
+ * A fully-qualified path representing project_location_cmekConfigs resource.
998
+ * @returns {string} A string representing the location.
999
+ */
1000
+ matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1001
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
1002
+ }
1003
+ /**
1004
+ * Parse the cmek_config from ProjectLocationCmekConfigs resource.
1005
+ *
1006
+ * @param {string} projectLocationCmekConfigsName
1007
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1008
+ * @returns {string} A string representing the cmek_config.
1009
+ */
1010
+ matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1011
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
1012
+ }
1018
1013
  /**
1019
1014
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
1020
1015
  *
@@ -3172,8 +3167,8 @@ class CompletionServiceClient {
3172
3167
  this._log.info('ending gRPC channel');
3173
3168
  this._terminated = true;
3174
3169
  stub.close();
3175
- this.locationsClient.close();
3176
- this.operationsClient.close();
3170
+ this.locationsClient.close().catch(err => { throw err; });
3171
+ void this.operationsClient.close();
3177
3172
  });
3178
3173
  }
3179
3174
  return Promise.resolve();