@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 UserEventServiceClient {
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 UserEventServiceClient {
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 UserEventServiceClient {
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,134 +202,29 @@ class UserEventServiceClient {
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 purgeUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.PurgeUserEventsResponse');
330
222
  const purgeUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.PurgeUserEventsMetadata');
331
223
  const importUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportUserEventsResponse');
332
224
  const importUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportUserEventsMetadata');
333
225
  this.descriptors.longrunning = {
334
226
  purgeUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeUserEventsResponse.decode.bind(purgeUserEventsResponse), purgeUserEventsMetadata.decode.bind(purgeUserEventsMetadata)),
335
- importUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importUserEventsResponse.decode.bind(importUserEventsResponse), importUserEventsMetadata.decode.bind(importUserEventsMetadata)),
227
+ importUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importUserEventsResponse.decode.bind(importUserEventsResponse), importUserEventsMetadata.decode.bind(importUserEventsMetadata))
336
228
  };
337
229
  // Put together the default options sent with requests.
338
230
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.UserEventService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -361,19 +253,13 @@ class UserEventServiceClient {
361
253
  }
362
254
  // Put together the "service stub" for
363
255
  // google.cloud.discoveryengine.v1.UserEventService.
364
- this.userEventServiceStub = this._gaxGrpc.createStub(this._opts.fallback
365
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.UserEventService')
366
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
367
- this._protos.google.cloud.discoveryengine.v1
368
- .UserEventService, this._opts, this._providedCustomServicePath);
256
+ this.userEventServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
257
+ this._protos.lookupService('google.cloud.discoveryengine.v1.UserEventService') :
258
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
259
+ this._protos.google.cloud.discoveryengine.v1.UserEventService, this._opts, this._providedCustomServicePath);
369
260
  // Iterate over each of the methods that the service provides
370
261
  // and create an API call method for each.
371
- const userEventServiceStubMethods = [
372
- 'writeUserEvent',
373
- 'collectUserEvent',
374
- 'purgeUserEvents',
375
- 'importUserEvents',
376
- ];
262
+ const userEventServiceStubMethods = ['writeUserEvent', 'collectUserEvent', 'purgeUserEvents', 'importUserEvents'];
377
263
  for (const methodName of userEventServiceStubMethods) {
378
264
  const callPromise = this.userEventServiceStub.then(stub => (...args) => {
379
265
  if (this._terminated) {
@@ -384,7 +270,8 @@ class UserEventServiceClient {
384
270
  }, (err) => () => {
385
271
  throw err;
386
272
  });
387
- const descriptor = this.descriptors.longrunning[methodName] || undefined;
273
+ const descriptor = this.descriptors.longrunning[methodName] ||
274
+ undefined;
388
275
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
389
276
  this.innerApiCalls[methodName] = apiCall;
390
277
  }
@@ -396,8 +283,7 @@ class UserEventServiceClient {
396
283
  * @returns {string} The DNS address for this service.
397
284
  */
398
285
  static get servicePath() {
399
- if (typeof process === 'object' &&
400
- typeof process.emitWarning === 'function') {
286
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
401
287
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
402
288
  }
403
289
  return 'discoveryengine.googleapis.com';
@@ -408,8 +294,7 @@ class UserEventServiceClient {
408
294
  * @returns {string} The DNS address for this service.
409
295
  */
410
296
  static get apiEndpoint() {
411
- if (typeof process === 'object' &&
412
- typeof process.emitWarning === 'function') {
297
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
413
298
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
414
299
  }
415
300
  return 'discoveryengine.googleapis.com';
@@ -437,7 +322,9 @@ class UserEventServiceClient {
437
322
  * @returns {string[]} List of default scopes.
438
323
  */
439
324
  static get scopes() {
440
- return ['https://www.googleapis.com/auth/cloud-platform'];
325
+ return [
326
+ 'https://www.googleapis.com/auth/cloud-platform'
327
+ ];
441
328
  }
442
329
  /**
443
330
  * Return the project ID used by this class.
@@ -463,13 +350,10 @@ class UserEventServiceClient {
463
350
  options = options || {};
464
351
  options.otherArgs = options.otherArgs || {};
465
352
  options.otherArgs.headers = options.otherArgs.headers || {};
466
- options.otherArgs.headers['x-goog-request-params'] =
467
- this._gaxModule.routingHeader.fromParams({
468
- parent: request.parent ?? '',
469
- });
470
- this.initialize().catch(err => {
471
- throw err;
353
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
354
+ 'parent': request.parent ?? '',
472
355
  });
356
+ this.initialize().catch(err => { throw err; });
473
357
  this._log.info('writeUserEvent request %j', request);
474
358
  const wrappedCallback = callback
475
359
  ? (error, response, options, rawResponse) => {
@@ -477,11 +361,16 @@ class UserEventServiceClient {
477
361
  callback(error, response, options, rawResponse); // We verified callback above.
478
362
  }
479
363
  : undefined;
480
- return this.innerApiCalls
481
- .writeUserEvent(request, options, wrappedCallback)
364
+ return this.innerApiCalls.writeUserEvent(request, options, wrappedCallback)
482
365
  ?.then(([response, options, rawResponse]) => {
483
366
  this._log.info('writeUserEvent response %j', response);
484
367
  return [response, options, rawResponse];
368
+ }).catch((error) => {
369
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
370
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
371
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
372
+ }
373
+ throw error;
485
374
  });
486
375
  }
487
376
  collectUserEvent(request, optionsOrCallback, callback) {
@@ -497,13 +386,10 @@ class UserEventServiceClient {
497
386
  options = options || {};
498
387
  options.otherArgs = options.otherArgs || {};
499
388
  options.otherArgs.headers = options.otherArgs.headers || {};
500
- options.otherArgs.headers['x-goog-request-params'] =
501
- this._gaxModule.routingHeader.fromParams({
502
- parent: request.parent ?? '',
503
- });
504
- this.initialize().catch(err => {
505
- throw err;
389
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
390
+ 'parent': request.parent ?? '',
506
391
  });
392
+ this.initialize().catch(err => { throw err; });
507
393
  this._log.info('collectUserEvent request %j', request);
508
394
  const wrappedCallback = callback
509
395
  ? (error, response, options, rawResponse) => {
@@ -511,11 +397,16 @@ class UserEventServiceClient {
511
397
  callback(error, response, options, rawResponse); // We verified callback above.
512
398
  }
513
399
  : undefined;
514
- return this.innerApiCalls
515
- .collectUserEvent(request, options, wrappedCallback)
400
+ return this.innerApiCalls.collectUserEvent(request, options, wrappedCallback)
516
401
  ?.then(([response, options, rawResponse]) => {
517
402
  this._log.info('collectUserEvent response %j', response);
518
403
  return [response, options, rawResponse];
404
+ }).catch((error) => {
405
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
406
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
407
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
408
+ }
409
+ throw error;
519
410
  });
520
411
  }
521
412
  purgeUserEvents(request, optionsOrCallback, callback) {
@@ -531,13 +422,10 @@ class UserEventServiceClient {
531
422
  options = options || {};
532
423
  options.otherArgs = options.otherArgs || {};
533
424
  options.otherArgs.headers = options.otherArgs.headers || {};
534
- options.otherArgs.headers['x-goog-request-params'] =
535
- this._gaxModule.routingHeader.fromParams({
536
- parent: request.parent ?? '',
537
- });
538
- this.initialize().catch(err => {
539
- throw err;
425
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
426
+ 'parent': request.parent ?? '',
540
427
  });
428
+ this.initialize().catch(err => { throw err; });
541
429
  const wrappedCallback = callback
542
430
  ? (error, response, rawResponse, _) => {
543
431
  this._log.info('purgeUserEvents response %j', rawResponse);
@@ -545,8 +433,7 @@ class UserEventServiceClient {
545
433
  }
546
434
  : undefined;
547
435
  this._log.info('purgeUserEvents request %j', request);
548
- return this.innerApiCalls
549
- .purgeUserEvents(request, options, wrappedCallback)
436
+ return this.innerApiCalls.purgeUserEvents(request, options, wrappedCallback)
550
437
  ?.then(([response, rawResponse, _]) => {
551
438
  this._log.info('purgeUserEvents response %j', rawResponse);
552
439
  return [response, rawResponse, _];
@@ -583,13 +470,10 @@ class UserEventServiceClient {
583
470
  options = options || {};
584
471
  options.otherArgs = options.otherArgs || {};
585
472
  options.otherArgs.headers = options.otherArgs.headers || {};
586
- options.otherArgs.headers['x-goog-request-params'] =
587
- this._gaxModule.routingHeader.fromParams({
588
- parent: request.parent ?? '',
589
- });
590
- this.initialize().catch(err => {
591
- throw err;
473
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
474
+ 'parent': request.parent ?? '',
592
475
  });
476
+ this.initialize().catch(err => { throw err; });
593
477
  const wrappedCallback = callback
594
478
  ? (error, response, rawResponse, _) => {
595
479
  this._log.info('importUserEvents response %j', rawResponse);
@@ -597,8 +481,7 @@ class UserEventServiceClient {
597
481
  }
598
482
  : undefined;
599
483
  this._log.info('importUserEvents request %j', request);
600
- return this.innerApiCalls
601
- .importUserEvents(request, options, wrappedCallback)
484
+ return this.innerApiCalls.importUserEvents(request, options, wrappedCallback)
602
485
  ?.then(([response, rawResponse, _]) => {
603
486
  this._log.info('importUserEvents response %j', rawResponse);
604
487
  return [response, rawResponse, _];
@@ -623,90 +506,90 @@ class UserEventServiceClient {
623
506
  return decodeOperation;
624
507
  }
625
508
  /**
626
- * Gets information about a location.
627
- *
628
- * @param {Object} request
629
- * The request object that will be sent.
630
- * @param {string} request.name
631
- * Resource name for the location.
632
- * @param {object} [options]
633
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
634
- * @returns {Promise} - The promise which resolves to an array.
635
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
636
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
637
- * for more details and examples.
638
- * @example
639
- * ```
640
- * const [response] = await client.getLocation(request);
641
- * ```
642
- */
509
+ * Gets information about a location.
510
+ *
511
+ * @param {Object} request
512
+ * The request object that will be sent.
513
+ * @param {string} request.name
514
+ * Resource name for the location.
515
+ * @param {object} [options]
516
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
517
+ * @returns {Promise} - The promise which resolves to an array.
518
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
519
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
520
+ * for more details and examples.
521
+ * @example
522
+ * ```
523
+ * const [response] = await client.getLocation(request);
524
+ * ```
525
+ */
643
526
  getLocation(request, options, callback) {
644
527
  return this.locationsClient.getLocation(request, options, callback);
645
528
  }
646
529
  /**
647
- * Lists information about the supported locations for this service. Returns an iterable object.
648
- *
649
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
650
- * @param {Object} request
651
- * The request object that will be sent.
652
- * @param {string} request.name
653
- * The resource that owns the locations collection, if applicable.
654
- * @param {string} request.filter
655
- * The standard list filter.
656
- * @param {number} request.pageSize
657
- * The standard list page size.
658
- * @param {string} request.pageToken
659
- * The standard list page token.
660
- * @param {object} [options]
661
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
662
- * @returns {Object}
663
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
664
- * When you iterate the returned iterable, each element will be an object representing
665
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
666
- * so you can stop the iteration when you don't need more results.
667
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
668
- * for more details and examples.
669
- * @example
670
- * ```
671
- * const iterable = client.listLocationsAsync(request);
672
- * for await (const response of iterable) {
673
- * // process response
674
- * }
675
- * ```
676
- */
530
+ * Lists information about the supported locations for this service. Returns an iterable object.
531
+ *
532
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
533
+ * @param {Object} request
534
+ * The request object that will be sent.
535
+ * @param {string} request.name
536
+ * The resource that owns the locations collection, if applicable.
537
+ * @param {string} request.filter
538
+ * The standard list filter.
539
+ * @param {number} request.pageSize
540
+ * The standard list page size.
541
+ * @param {string} request.pageToken
542
+ * The standard list page token.
543
+ * @param {object} [options]
544
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
545
+ * @returns {Object}
546
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
547
+ * When you iterate the returned iterable, each element will be an object representing
548
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
549
+ * so you can stop the iteration when you don't need more results.
550
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
551
+ * for more details and examples.
552
+ * @example
553
+ * ```
554
+ * const iterable = client.listLocationsAsync(request);
555
+ * for await (const response of iterable) {
556
+ * // process response
557
+ * }
558
+ * ```
559
+ */
677
560
  listLocationsAsync(request, options) {
678
561
  return this.locationsClient.listLocationsAsync(request, options);
679
562
  }
680
563
  /**
681
- * Gets the latest state of a long-running operation. Clients can use this
682
- * method to poll the operation result at intervals as recommended by the API
683
- * service.
684
- *
685
- * @param {Object} request - The request object that will be sent.
686
- * @param {string} request.name - The name of the operation resource.
687
- * @param {Object=} options
688
- * Optional parameters. You can override the default settings for this call,
689
- * e.g, timeout, retries, paginations, etc. See {@link
690
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
691
- * for the details.
692
- * @param {function(?Error, ?Object)=} callback
693
- * The function which will be called with the result of the API call.
694
- *
695
- * The second parameter to the callback is an object representing
696
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
697
- * @return {Promise} - The promise which resolves to an array.
698
- * The first element of the array is an object representing
699
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
700
- * The promise has a method named "cancel" which cancels the ongoing API call.
701
- *
702
- * @example
703
- * ```
704
- * const client = longrunning.operationsClient();
705
- * const name = '';
706
- * const [response] = await client.getOperation({name});
707
- * // doThingsWith(response)
708
- * ```
709
- */
564
+ * Gets the latest state of a long-running operation. Clients can use this
565
+ * method to poll the operation result at intervals as recommended by the API
566
+ * service.
567
+ *
568
+ * @param {Object} request - The request object that will be sent.
569
+ * @param {string} request.name - The name of the operation resource.
570
+ * @param {Object=} options
571
+ * Optional parameters. You can override the default settings for this call,
572
+ * e.g, timeout, retries, paginations, etc. See {@link
573
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
574
+ * for the details.
575
+ * @param {function(?Error, ?Object)=} callback
576
+ * The function which will be called with the result of the API call.
577
+ *
578
+ * The second parameter to the callback is an object representing
579
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
580
+ * @return {Promise} - The promise which resolves to an array.
581
+ * The first element of the array is an object representing
582
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
583
+ * The promise has a method named "cancel" which cancels the ongoing API call.
584
+ *
585
+ * @example
586
+ * ```
587
+ * const client = longrunning.operationsClient();
588
+ * const name = '';
589
+ * const [response] = await client.getOperation({name});
590
+ * // doThingsWith(response)
591
+ * ```
592
+ */
710
593
  getOperation(request, optionsOrCallback, callback) {
711
594
  let options;
712
595
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -917,6 +800,51 @@ class UserEventServiceClient {
917
800
  matchEngineFromEngineName(engineName) {
918
801
  return this.pathTemplates.enginePathTemplate.match(engineName).engine;
919
802
  }
803
+ /**
804
+ * Return a fully-qualified identityMappingStore resource name string.
805
+ *
806
+ * @param {string} project
807
+ * @param {string} location
808
+ * @param {string} identity_mapping_store
809
+ * @returns {string} Resource name string.
810
+ */
811
+ identityMappingStorePath(project, location, identityMappingStore) {
812
+ return this.pathTemplates.identityMappingStorePathTemplate.render({
813
+ project: project,
814
+ location: location,
815
+ identity_mapping_store: identityMappingStore,
816
+ });
817
+ }
818
+ /**
819
+ * Parse the project from IdentityMappingStore resource.
820
+ *
821
+ * @param {string} identityMappingStoreName
822
+ * A fully-qualified path representing IdentityMappingStore resource.
823
+ * @returns {string} A string representing the project.
824
+ */
825
+ matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
826
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
827
+ }
828
+ /**
829
+ * Parse the location from IdentityMappingStore resource.
830
+ *
831
+ * @param {string} identityMappingStoreName
832
+ * A fully-qualified path representing IdentityMappingStore resource.
833
+ * @returns {string} A string representing the location.
834
+ */
835
+ matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
836
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
837
+ }
838
+ /**
839
+ * Parse the identity_mapping_store from IdentityMappingStore resource.
840
+ *
841
+ * @param {string} identityMappingStoreName
842
+ * A fully-qualified path representing IdentityMappingStore resource.
843
+ * @returns {string} A string representing the identity_mapping_store.
844
+ */
845
+ matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
846
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
847
+ }
920
848
  /**
921
849
  * Return a fully-qualified project resource name string.
922
850
  *
@@ -938,6 +866,84 @@ class UserEventServiceClient {
938
866
  matchProjectFromProjectName(projectName) {
939
867
  return this.pathTemplates.projectPathTemplate.match(projectName).project;
940
868
  }
869
+ /**
870
+ * Return a fully-qualified projectLocationCmekConfig resource name string.
871
+ *
872
+ * @param {string} project
873
+ * @param {string} location
874
+ * @returns {string} Resource name string.
875
+ */
876
+ projectLocationCmekConfigPath(project, location) {
877
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
878
+ project: project,
879
+ location: location,
880
+ });
881
+ }
882
+ /**
883
+ * Parse the project from ProjectLocationCmekConfig resource.
884
+ *
885
+ * @param {string} projectLocationCmekConfigName
886
+ * A fully-qualified path representing project_location_cmekConfig resource.
887
+ * @returns {string} A string representing the project.
888
+ */
889
+ matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
890
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
891
+ }
892
+ /**
893
+ * Parse the location from ProjectLocationCmekConfig resource.
894
+ *
895
+ * @param {string} projectLocationCmekConfigName
896
+ * A fully-qualified path representing project_location_cmekConfig resource.
897
+ * @returns {string} A string representing the location.
898
+ */
899
+ matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
900
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
901
+ }
902
+ /**
903
+ * Return a fully-qualified projectLocationCmekConfigs resource name string.
904
+ *
905
+ * @param {string} project
906
+ * @param {string} location
907
+ * @param {string} cmek_config
908
+ * @returns {string} Resource name string.
909
+ */
910
+ projectLocationCmekConfigsPath(project, location, cmekConfig) {
911
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
912
+ project: project,
913
+ location: location,
914
+ cmek_config: cmekConfig,
915
+ });
916
+ }
917
+ /**
918
+ * Parse the project from ProjectLocationCmekConfigs resource.
919
+ *
920
+ * @param {string} projectLocationCmekConfigsName
921
+ * A fully-qualified path representing project_location_cmekConfigs resource.
922
+ * @returns {string} A string representing the project.
923
+ */
924
+ matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
925
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
926
+ }
927
+ /**
928
+ * Parse the location from ProjectLocationCmekConfigs resource.
929
+ *
930
+ * @param {string} projectLocationCmekConfigsName
931
+ * A fully-qualified path representing project_location_cmekConfigs resource.
932
+ * @returns {string} A string representing the location.
933
+ */
934
+ matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
935
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
936
+ }
937
+ /**
938
+ * Parse the cmek_config from ProjectLocationCmekConfigs resource.
939
+ *
940
+ * @param {string} projectLocationCmekConfigsName
941
+ * A fully-qualified path representing project_location_cmekConfigs resource.
942
+ * @returns {string} A string representing the cmek_config.
943
+ */
944
+ matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
945
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
946
+ }
941
947
  /**
942
948
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
943
949
  *
@@ -3095,8 +3101,8 @@ class UserEventServiceClient {
3095
3101
  this._log.info('ending gRPC channel');
3096
3102
  this._terminated = true;
3097
3103
  stub.close();
3098
- this.locationsClient.close();
3099
- this.operationsClient.close();
3104
+ this.locationsClient.close().catch(err => { throw err; });
3105
+ void this.operationsClient.close();
3100
3106
  });
3101
3107
  }
3102
3108
  return Promise.resolve();