@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
@@ -99,26 +99,17 @@ class EngineServiceClient {
99
99
  constructor(opts, gaxInstance) {
100
100
  // Ensure that options include all the required fields.
101
101
  const staticMembers = this.constructor;
102
- if (opts?.universe_domain &&
103
- opts?.universeDomain &&
104
- opts?.universe_domain !== opts?.universeDomain) {
102
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
105
103
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
106
104
  }
107
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
108
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
109
- : undefined;
110
- this._universeDomain =
111
- opts?.universeDomain ??
112
- opts?.universe_domain ??
113
- universeDomainEnvVar ??
114
- 'googleapis.com';
105
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
106
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
115
107
  this._servicePath = 'discoveryengine.' + this._universeDomain;
116
108
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
117
109
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
118
110
  const port = opts?.port || staticMembers.port;
119
111
  const clientConfig = opts?.clientConfig ?? {};
120
- const fallback = opts?.fallback ??
121
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
112
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
122
113
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
123
114
  // Request numeric enum values if REST transport is used.
124
115
  opts.numericEnums = true;
@@ -148,7 +139,10 @@ class EngineServiceClient {
148
139
  }
149
140
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
150
141
  // Determine the client header string.
151
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
142
+ const clientHeader = [
143
+ `gax/${this._gaxModule.version}`,
144
+ `gapic/${version}`,
145
+ ];
152
146
  if (typeof process === 'object' && 'versions' in process) {
153
147
  clientHeader.push(`gl-node/${process.versions.node}`);
154
148
  }
@@ -172,7 +166,10 @@ class EngineServiceClient {
172
166
  this.pathTemplates = {
173
167
  collectionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}'),
174
168
  enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
169
+ identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
175
170
  projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
171
+ projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
172
+ projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
176
173
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
177
174
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
178
175
  projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
@@ -211,136 +208,31 @@ class EngineServiceClient {
211
208
  // (e.g. 50 results at a time, with tokens to get subsequent
212
209
  // pages). Denote the keys used for pagination and results.
213
210
  this.descriptors.page = {
214
- listEngines: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'engines'),
211
+ listEngines: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'engines')
215
212
  };
216
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
213
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
217
214
  // This API contains "long-running operations", which return a
218
215
  // an Operation object that allows for tracking of the operation,
219
216
  // rather than holding a request open.
220
217
  const lroOptions = {
221
218
  auth: this.auth,
222
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
219
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
223
220
  };
224
221
  if (opts.fallback) {
225
222
  lroOptions.protoJson = protoFilesRoot;
226
- lroOptions.httpRules = [
227
- {
228
- selector: 'google.longrunning.Operations.CancelOperation',
229
- post: '/v1/{name=projects/*/operations/*}:cancel',
230
- body: '*',
231
- additional_bindings: [
232
- {
233
- post: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
234
- body: '*',
235
- },
236
- {
237
- post: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
238
- body: '*',
239
- },
240
- ],
241
- },
242
- {
243
- selector: 'google.longrunning.Operations.GetOperation',
244
- get: '/v1/{name=projects/*/operations/*}',
245
- additional_bindings: [
246
- {
247
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
248
- },
249
- {
250
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
251
- },
252
- {
253
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
254
- },
255
- {
256
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
257
- },
258
- {
259
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
260
- },
261
- {
262
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
263
- },
264
- {
265
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
266
- },
267
- {
268
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
269
- },
270
- {
271
- get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
272
- },
273
- {
274
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
275
- },
276
- {
277
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
278
- },
279
- {
280
- get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
281
- },
282
- {
283
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*/operations/*}',
284
- },
285
- { get: '/v1/{name=projects/*/locations/*/operations/*}' },
286
- { get: '/v1/{name=projects/*/operations/*}' },
287
- ],
288
- },
289
- {
290
- selector: 'google.longrunning.Operations.ListOperations',
291
- get: '/v1/{name=projects/*}/operations',
292
- additional_bindings: [
293
- {
294
- get: '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
295
- },
296
- {
297
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
298
- },
299
- {
300
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
301
- },
302
- {
303
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
304
- },
305
- {
306
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
307
- },
308
- {
309
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
310
- },
311
- {
312
- get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
313
- },
314
- {
315
- get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
316
- },
317
- { get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
318
- {
319
- get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
320
- },
321
- {
322
- get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
323
- },
324
- { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
325
- {
326
- get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
327
- },
328
- { get: '/v1/{name=projects/*/locations/*}/operations' },
329
- { get: '/v1/{name=projects/*}/operations' },
330
- ],
331
- },
332
- ];
223
+ 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: '*', }],
224
+ }, { 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/*}', }],
225
+ }, { 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', }],
226
+ }];
333
227
  }
334
- this.operationsClient = this._gaxModule
335
- .lro(lroOptions)
336
- .operationsClient(opts);
228
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
337
229
  const createEngineResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.Engine');
338
230
  const createEngineMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.CreateEngineMetadata');
339
231
  const deleteEngineResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
340
232
  const deleteEngineMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.DeleteEngineMetadata');
341
233
  this.descriptors.longrunning = {
342
234
  createEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createEngineResponse.decode.bind(createEngineResponse), createEngineMetadata.decode.bind(createEngineMetadata)),
343
- deleteEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteEngineResponse.decode.bind(deleteEngineResponse), deleteEngineMetadata.decode.bind(deleteEngineMetadata)),
235
+ deleteEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteEngineResponse.decode.bind(deleteEngineResponse), deleteEngineMetadata.decode.bind(deleteEngineMetadata))
344
236
  };
345
237
  // Put together the default options sent with requests.
346
238
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.EngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -369,19 +261,13 @@ class EngineServiceClient {
369
261
  }
370
262
  // Put together the "service stub" for
371
263
  // google.cloud.discoveryengine.v1.EngineService.
372
- this.engineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
373
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.EngineService')
374
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
375
- this._protos.google.cloud.discoveryengine.v1.EngineService, this._opts, this._providedCustomServicePath);
264
+ this.engineServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
265
+ this._protos.lookupService('google.cloud.discoveryengine.v1.EngineService') :
266
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
267
+ this._protos.google.cloud.discoveryengine.v1.EngineService, this._opts, this._providedCustomServicePath);
376
268
  // Iterate over each of the methods that the service provides
377
269
  // and create an API call method for each.
378
- const engineServiceStubMethods = [
379
- 'createEngine',
380
- 'deleteEngine',
381
- 'updateEngine',
382
- 'getEngine',
383
- 'listEngines',
384
- ];
270
+ const engineServiceStubMethods = ['createEngine', 'deleteEngine', 'updateEngine', 'getEngine', 'listEngines'];
385
271
  for (const methodName of engineServiceStubMethods) {
386
272
  const callPromise = this.engineServiceStub.then(stub => (...args) => {
387
273
  if (this._terminated) {
@@ -406,8 +292,7 @@ class EngineServiceClient {
406
292
  * @returns {string} The DNS address for this service.
407
293
  */
408
294
  static get servicePath() {
409
- if (typeof process === 'object' &&
410
- typeof process.emitWarning === 'function') {
295
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
411
296
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
412
297
  }
413
298
  return 'discoveryengine.googleapis.com';
@@ -418,8 +303,7 @@ class EngineServiceClient {
418
303
  * @returns {string} The DNS address for this service.
419
304
  */
420
305
  static get apiEndpoint() {
421
- if (typeof process === 'object' &&
422
- typeof process.emitWarning === 'function') {
306
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
423
307
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
424
308
  }
425
309
  return 'discoveryengine.googleapis.com';
@@ -447,7 +331,9 @@ class EngineServiceClient {
447
331
  * @returns {string[]} List of default scopes.
448
332
  */
449
333
  static get scopes() {
450
- return ['https://www.googleapis.com/auth/cloud-platform'];
334
+ return [
335
+ 'https://www.googleapis.com/auth/cloud-platform'
336
+ ];
451
337
  }
452
338
  /**
453
339
  * Return the project ID used by this class.
@@ -473,13 +359,10 @@ class EngineServiceClient {
473
359
  options = options || {};
474
360
  options.otherArgs = options.otherArgs || {};
475
361
  options.otherArgs.headers = options.otherArgs.headers || {};
476
- options.otherArgs.headers['x-goog-request-params'] =
477
- this._gaxModule.routingHeader.fromParams({
478
- 'engine.name': request.engine.name ?? '',
479
- });
480
- this.initialize().catch(err => {
481
- throw err;
362
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
363
+ 'engine.name': request.engine.name ?? '',
482
364
  });
365
+ this.initialize().catch(err => { throw err; });
483
366
  this._log.info('updateEngine request %j', request);
484
367
  const wrappedCallback = callback
485
368
  ? (error, response, options, rawResponse) => {
@@ -487,11 +370,16 @@ class EngineServiceClient {
487
370
  callback(error, response, options, rawResponse); // We verified callback above.
488
371
  }
489
372
  : undefined;
490
- return this.innerApiCalls
491
- .updateEngine(request, options, wrappedCallback)
373
+ return this.innerApiCalls.updateEngine(request, options, wrappedCallback)
492
374
  ?.then(([response, options, rawResponse]) => {
493
375
  this._log.info('updateEngine response %j', response);
494
376
  return [response, options, rawResponse];
377
+ }).catch((error) => {
378
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
379
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
380
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
381
+ }
382
+ throw error;
495
383
  });
496
384
  }
497
385
  getEngine(request, optionsOrCallback, callback) {
@@ -507,13 +395,10 @@ class EngineServiceClient {
507
395
  options = options || {};
508
396
  options.otherArgs = options.otherArgs || {};
509
397
  options.otherArgs.headers = options.otherArgs.headers || {};
510
- options.otherArgs.headers['x-goog-request-params'] =
511
- this._gaxModule.routingHeader.fromParams({
512
- name: request.name ?? '',
513
- });
514
- this.initialize().catch(err => {
515
- throw err;
398
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
399
+ 'name': request.name ?? '',
516
400
  });
401
+ this.initialize().catch(err => { throw err; });
517
402
  this._log.info('getEngine request %j', request);
518
403
  const wrappedCallback = callback
519
404
  ? (error, response, options, rawResponse) => {
@@ -521,11 +406,16 @@ class EngineServiceClient {
521
406
  callback(error, response, options, rawResponse); // We verified callback above.
522
407
  }
523
408
  : undefined;
524
- return this.innerApiCalls
525
- .getEngine(request, options, wrappedCallback)
409
+ return this.innerApiCalls.getEngine(request, options, wrappedCallback)
526
410
  ?.then(([response, options, rawResponse]) => {
527
411
  this._log.info('getEngine response %j', response);
528
412
  return [response, options, rawResponse];
413
+ }).catch((error) => {
414
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
415
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
416
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
417
+ }
418
+ throw error;
529
419
  });
530
420
  }
531
421
  createEngine(request, optionsOrCallback, callback) {
@@ -541,13 +431,10 @@ class EngineServiceClient {
541
431
  options = options || {};
542
432
  options.otherArgs = options.otherArgs || {};
543
433
  options.otherArgs.headers = options.otherArgs.headers || {};
544
- options.otherArgs.headers['x-goog-request-params'] =
545
- this._gaxModule.routingHeader.fromParams({
546
- parent: request.parent ?? '',
547
- });
548
- this.initialize().catch(err => {
549
- throw err;
434
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
435
+ 'parent': request.parent ?? '',
550
436
  });
437
+ this.initialize().catch(err => { throw err; });
551
438
  const wrappedCallback = callback
552
439
  ? (error, response, rawResponse, _) => {
553
440
  this._log.info('createEngine response %j', rawResponse);
@@ -555,8 +442,7 @@ class EngineServiceClient {
555
442
  }
556
443
  : undefined;
557
444
  this._log.info('createEngine request %j', request);
558
- return this.innerApiCalls
559
- .createEngine(request, options, wrappedCallback)
445
+ return this.innerApiCalls.createEngine(request, options, wrappedCallback)
560
446
  ?.then(([response, rawResponse, _]) => {
561
447
  this._log.info('createEngine response %j', rawResponse);
562
448
  return [response, rawResponse, _];
@@ -593,13 +479,10 @@ class EngineServiceClient {
593
479
  options = options || {};
594
480
  options.otherArgs = options.otherArgs || {};
595
481
  options.otherArgs.headers = options.otherArgs.headers || {};
596
- options.otherArgs.headers['x-goog-request-params'] =
597
- this._gaxModule.routingHeader.fromParams({
598
- name: request.name ?? '',
599
- });
600
- this.initialize().catch(err => {
601
- throw err;
482
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
483
+ 'name': request.name ?? '',
602
484
  });
485
+ this.initialize().catch(err => { throw err; });
603
486
  const wrappedCallback = callback
604
487
  ? (error, response, rawResponse, _) => {
605
488
  this._log.info('deleteEngine response %j', rawResponse);
@@ -607,8 +490,7 @@ class EngineServiceClient {
607
490
  }
608
491
  : undefined;
609
492
  this._log.info('deleteEngine request %j', request);
610
- return this.innerApiCalls
611
- .deleteEngine(request, options, wrappedCallback)
493
+ return this.innerApiCalls.deleteEngine(request, options, wrappedCallback)
612
494
  ?.then(([response, rawResponse, _]) => {
613
495
  this._log.info('deleteEngine response %j', rawResponse);
614
496
  return [response, rawResponse, _];
@@ -645,13 +527,10 @@ class EngineServiceClient {
645
527
  options = options || {};
646
528
  options.otherArgs = options.otherArgs || {};
647
529
  options.otherArgs.headers = options.otherArgs.headers || {};
648
- options.otherArgs.headers['x-goog-request-params'] =
649
- this._gaxModule.routingHeader.fromParams({
650
- parent: request.parent ?? '',
651
- });
652
- this.initialize().catch(err => {
653
- throw err;
530
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
531
+ 'parent': request.parent ?? '',
654
532
  });
533
+ this.initialize().catch(err => { throw err; });
655
534
  const wrappedCallback = callback
656
535
  ? (error, values, nextPageRequest, rawResponse) => {
657
536
  this._log.info('listEngines values %j', values);
@@ -696,15 +575,12 @@ class EngineServiceClient {
696
575
  options = options || {};
697
576
  options.otherArgs = options.otherArgs || {};
698
577
  options.otherArgs.headers = options.otherArgs.headers || {};
699
- options.otherArgs.headers['x-goog-request-params'] =
700
- this._gaxModule.routingHeader.fromParams({
701
- parent: request.parent ?? '',
702
- });
578
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
579
+ 'parent': request.parent ?? '',
580
+ });
703
581
  const defaultCallSettings = this._defaults['listEngines'];
704
582
  const callSettings = defaultCallSettings.merge(options);
705
- this.initialize().catch(err => {
706
- throw err;
707
- });
583
+ this.initialize().catch(err => { throw err; });
708
584
  this._log.info('listEngines stream %j', request);
709
585
  return this.descriptors.page.listEngines.createStream(this.innerApiCalls.listEngines, request, callSettings);
710
586
  }
@@ -741,103 +617,100 @@ class EngineServiceClient {
741
617
  options = options || {};
742
618
  options.otherArgs = options.otherArgs || {};
743
619
  options.otherArgs.headers = options.otherArgs.headers || {};
744
- options.otherArgs.headers['x-goog-request-params'] =
745
- this._gaxModule.routingHeader.fromParams({
746
- parent: request.parent ?? '',
747
- });
620
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
621
+ 'parent': request.parent ?? '',
622
+ });
748
623
  const defaultCallSettings = this._defaults['listEngines'];
749
624
  const callSettings = defaultCallSettings.merge(options);
750
- this.initialize().catch(err => {
751
- throw err;
752
- });
625
+ this.initialize().catch(err => { throw err; });
753
626
  this._log.info('listEngines iterate %j', request);
754
627
  return this.descriptors.page.listEngines.asyncIterate(this.innerApiCalls['listEngines'], request, callSettings);
755
628
  }
756
629
  /**
757
- * Gets information about a location.
758
- *
759
- * @param {Object} request
760
- * The request object that will be sent.
761
- * @param {string} request.name
762
- * Resource name for the location.
763
- * @param {object} [options]
764
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
765
- * @returns {Promise} - The promise which resolves to an array.
766
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
767
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
768
- * for more details and examples.
769
- * @example
770
- * ```
771
- * const [response] = await client.getLocation(request);
772
- * ```
773
- */
630
+ * Gets information about a location.
631
+ *
632
+ * @param {Object} request
633
+ * The request object that will be sent.
634
+ * @param {string} request.name
635
+ * Resource name for the location.
636
+ * @param {object} [options]
637
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
638
+ * @returns {Promise} - The promise which resolves to an array.
639
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
640
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
641
+ * for more details and examples.
642
+ * @example
643
+ * ```
644
+ * const [response] = await client.getLocation(request);
645
+ * ```
646
+ */
774
647
  getLocation(request, options, callback) {
775
648
  return this.locationsClient.getLocation(request, options, callback);
776
649
  }
777
650
  /**
778
- * Lists information about the supported locations for this service. Returns an iterable object.
779
- *
780
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
781
- * @param {Object} request
782
- * The request object that will be sent.
783
- * @param {string} request.name
784
- * The resource that owns the locations collection, if applicable.
785
- * @param {string} request.filter
786
- * The standard list filter.
787
- * @param {number} request.pageSize
788
- * The standard list page size.
789
- * @param {string} request.pageToken
790
- * The standard list page token.
791
- * @param {object} [options]
792
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
793
- * @returns {Object}
794
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
795
- * When you iterate the returned iterable, each element will be an object representing
796
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
797
- * so you can stop the iteration when you don't need more results.
798
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
799
- * for more details and examples.
800
- * @example
801
- * ```
802
- * const iterable = client.listLocationsAsync(request);
803
- * for await (const response of iterable) {
804
- * // process response
805
- * }
806
- * ```
807
- */
651
+ * Lists information about the supported locations for this service. Returns an iterable object.
652
+ *
653
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
654
+ * @param {Object} request
655
+ * The request object that will be sent.
656
+ * @param {string} request.name
657
+ * The resource that owns the locations collection, if applicable.
658
+ * @param {string} request.filter
659
+ * The standard list filter.
660
+ * @param {number} request.pageSize
661
+ * The standard list page size.
662
+ * @param {string} request.pageToken
663
+ * The standard list page token.
664
+ * @param {object} [options]
665
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
666
+ * @returns {Object}
667
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
668
+ * When you iterate the returned iterable, each element will be an object representing
669
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
670
+ * so you can stop the iteration when you don't need more results.
671
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
672
+ * for more details and examples.
673
+ * @example
674
+ * ```
675
+ * const iterable = client.listLocationsAsync(request);
676
+ * for await (const response of iterable) {
677
+ * // process response
678
+ * }
679
+ * ```
680
+ */
808
681
  listLocationsAsync(request, options) {
809
682
  return this.locationsClient.listLocationsAsync(request, options);
810
683
  }
811
684
  /**
812
- * Gets the latest state of a long-running operation. Clients can use this
813
- * method to poll the operation result at intervals as recommended by the API
814
- * service.
815
- *
816
- * @param {Object} request - The request object that will be sent.
817
- * @param {string} request.name - The name of the operation resource.
818
- * @param {Object=} options
819
- * Optional parameters. You can override the default settings for this call,
820
- * e.g, timeout, retries, paginations, etc. See {@link
821
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
822
- * for the details.
823
- * @param {function(?Error, ?Object)=} callback
824
- * The function which will be called with the result of the API call.
825
- *
826
- * The second parameter to the callback is an object representing
827
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
828
- * @return {Promise} - The promise which resolves to an array.
829
- * The first element of the array is an object representing
830
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
831
- * The promise has a method named "cancel" which cancels the ongoing API call.
832
- *
833
- * @example
834
- * ```
835
- * const client = longrunning.operationsClient();
836
- * const name = '';
837
- * const [response] = await client.getOperation({name});
838
- * // doThingsWith(response)
839
- * ```
840
- */
685
+ * Gets the latest state of a long-running operation. Clients can use this
686
+ * method to poll the operation result at intervals as recommended by the API
687
+ * service.
688
+ *
689
+ * @param {Object} request - The request object that will be sent.
690
+ * @param {string} request.name - The name of the operation resource.
691
+ * @param {Object=} options
692
+ * Optional parameters. You can override the default settings for this call,
693
+ * e.g, timeout, retries, paginations, etc. See {@link
694
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
695
+ * for the details.
696
+ * @param {function(?Error, ?Object)=} callback
697
+ * The function which will be called with the result of the API call.
698
+ *
699
+ * The second parameter to the callback is an object representing
700
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
701
+ * @return {Promise} - The promise which resolves to an array.
702
+ * The first element of the array is an object representing
703
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
704
+ * The promise has a method named "cancel" which cancels the ongoing API call.
705
+ *
706
+ * @example
707
+ * ```
708
+ * const client = longrunning.operationsClient();
709
+ * const name = '';
710
+ * const [response] = await client.getOperation({name});
711
+ * // doThingsWith(response)
712
+ * ```
713
+ */
841
714
  getOperation(request, optionsOrCallback, callback) {
842
715
  let options;
843
716
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1014,8 +887,7 @@ class EngineServiceClient {
1014
887
  * @returns {string} A string representing the project.
1015
888
  */
1016
889
  matchProjectFromCollectionName(collectionName) {
1017
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1018
- .project;
890
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
1019
891
  }
1020
892
  /**
1021
893
  * Parse the location from Collection resource.
@@ -1025,8 +897,7 @@ class EngineServiceClient {
1025
897
  * @returns {string} A string representing the location.
1026
898
  */
1027
899
  matchLocationFromCollectionName(collectionName) {
1028
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1029
- .location;
900
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
1030
901
  }
1031
902
  /**
1032
903
  * Parse the collection from Collection resource.
@@ -1036,8 +907,7 @@ class EngineServiceClient {
1036
907
  * @returns {string} A string representing the collection.
1037
908
  */
1038
909
  matchCollectionFromCollectionName(collectionName) {
1039
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1040
- .collection;
910
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
1041
911
  }
1042
912
  /**
1043
913
  * Return a fully-qualified engine resource name string.
@@ -1096,6 +966,51 @@ class EngineServiceClient {
1096
966
  matchEngineFromEngineName(engineName) {
1097
967
  return this.pathTemplates.enginePathTemplate.match(engineName).engine;
1098
968
  }
969
+ /**
970
+ * Return a fully-qualified identityMappingStore resource name string.
971
+ *
972
+ * @param {string} project
973
+ * @param {string} location
974
+ * @param {string} identity_mapping_store
975
+ * @returns {string} Resource name string.
976
+ */
977
+ identityMappingStorePath(project, location, identityMappingStore) {
978
+ return this.pathTemplates.identityMappingStorePathTemplate.render({
979
+ project: project,
980
+ location: location,
981
+ identity_mapping_store: identityMappingStore,
982
+ });
983
+ }
984
+ /**
985
+ * Parse the project from IdentityMappingStore resource.
986
+ *
987
+ * @param {string} identityMappingStoreName
988
+ * A fully-qualified path representing IdentityMappingStore resource.
989
+ * @returns {string} A string representing the project.
990
+ */
991
+ matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
992
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
993
+ }
994
+ /**
995
+ * Parse the location from IdentityMappingStore resource.
996
+ *
997
+ * @param {string} identityMappingStoreName
998
+ * A fully-qualified path representing IdentityMappingStore resource.
999
+ * @returns {string} A string representing the location.
1000
+ */
1001
+ matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
1002
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
1003
+ }
1004
+ /**
1005
+ * Parse the identity_mapping_store from IdentityMappingStore resource.
1006
+ *
1007
+ * @param {string} identityMappingStoreName
1008
+ * A fully-qualified path representing IdentityMappingStore resource.
1009
+ * @returns {string} A string representing the identity_mapping_store.
1010
+ */
1011
+ matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
1012
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
1013
+ }
1099
1014
  /**
1100
1015
  * Return a fully-qualified project resource name string.
1101
1016
  *
@@ -1117,6 +1032,84 @@ class EngineServiceClient {
1117
1032
  matchProjectFromProjectName(projectName) {
1118
1033
  return this.pathTemplates.projectPathTemplate.match(projectName).project;
1119
1034
  }
1035
+ /**
1036
+ * Return a fully-qualified projectLocationCmekConfig resource name string.
1037
+ *
1038
+ * @param {string} project
1039
+ * @param {string} location
1040
+ * @returns {string} Resource name string.
1041
+ */
1042
+ projectLocationCmekConfigPath(project, location) {
1043
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
1044
+ project: project,
1045
+ location: location,
1046
+ });
1047
+ }
1048
+ /**
1049
+ * Parse the project from ProjectLocationCmekConfig resource.
1050
+ *
1051
+ * @param {string} projectLocationCmekConfigName
1052
+ * A fully-qualified path representing project_location_cmekConfig resource.
1053
+ * @returns {string} A string representing the project.
1054
+ */
1055
+ matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
1056
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
1057
+ }
1058
+ /**
1059
+ * Parse the location from ProjectLocationCmekConfig resource.
1060
+ *
1061
+ * @param {string} projectLocationCmekConfigName
1062
+ * A fully-qualified path representing project_location_cmekConfig resource.
1063
+ * @returns {string} A string representing the location.
1064
+ */
1065
+ matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
1066
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
1067
+ }
1068
+ /**
1069
+ * Return a fully-qualified projectLocationCmekConfigs resource name string.
1070
+ *
1071
+ * @param {string} project
1072
+ * @param {string} location
1073
+ * @param {string} cmek_config
1074
+ * @returns {string} Resource name string.
1075
+ */
1076
+ projectLocationCmekConfigsPath(project, location, cmekConfig) {
1077
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
1078
+ project: project,
1079
+ location: location,
1080
+ cmek_config: cmekConfig,
1081
+ });
1082
+ }
1083
+ /**
1084
+ * Parse the project from ProjectLocationCmekConfigs resource.
1085
+ *
1086
+ * @param {string} projectLocationCmekConfigsName
1087
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1088
+ * @returns {string} A string representing the project.
1089
+ */
1090
+ matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1091
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
1092
+ }
1093
+ /**
1094
+ * Parse the location from ProjectLocationCmekConfigs resource.
1095
+ *
1096
+ * @param {string} projectLocationCmekConfigsName
1097
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1098
+ * @returns {string} A string representing the location.
1099
+ */
1100
+ matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1101
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
1102
+ }
1103
+ /**
1104
+ * Parse the cmek_config from ProjectLocationCmekConfigs resource.
1105
+ *
1106
+ * @param {string} projectLocationCmekConfigsName
1107
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1108
+ * @returns {string} A string representing the cmek_config.
1109
+ */
1110
+ matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1111
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
1112
+ }
1120
1113
  /**
1121
1114
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
1122
1115
  *
@@ -3274,8 +3267,8 @@ class EngineServiceClient {
3274
3267
  this._log.info('ending gRPC channel');
3275
3268
  this._terminated = true;
3276
3269
  stub.close();
3277
- this.locationsClient.close();
3278
- this.operationsClient.close();
3270
+ this.locationsClient.close().catch(err => { throw err; });
3271
+ void this.operationsClient.close();
3279
3272
  });
3280
3273
  }
3281
3274
  return Promise.resolve();