@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 DataStoreServiceClient {
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 DataStoreServiceClient {
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 DataStoreServiceClient {
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 DataStoreServiceClient {
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
- listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores'),
211
+ listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
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 createDataStoreResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.DataStore');
338
230
  const createDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.CreateDataStoreMetadata');
339
231
  const deleteDataStoreResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
340
232
  const deleteDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.DeleteDataStoreMetadata');
341
233
  this.descriptors.longrunning = {
342
234
  createDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createDataStoreResponse.decode.bind(createDataStoreResponse), createDataStoreMetadata.decode.bind(createDataStoreMetadata)),
343
- deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata)),
235
+ deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata))
344
236
  };
345
237
  // Put together the default options sent with requests.
346
238
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.DataStoreService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -369,20 +261,13 @@ class DataStoreServiceClient {
369
261
  }
370
262
  // Put together the "service stub" for
371
263
  // google.cloud.discoveryengine.v1.DataStoreService.
372
- this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback
373
- ? this._protos.lookupService('google.cloud.discoveryengine.v1.DataStoreService')
374
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
375
- this._protos.google.cloud.discoveryengine.v1
376
- .DataStoreService, this._opts, this._providedCustomServicePath);
264
+ this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
265
+ this._protos.lookupService('google.cloud.discoveryengine.v1.DataStoreService') :
266
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
267
+ this._protos.google.cloud.discoveryengine.v1.DataStoreService, this._opts, this._providedCustomServicePath);
377
268
  // Iterate over each of the methods that the service provides
378
269
  // and create an API call method for each.
379
- const dataStoreServiceStubMethods = [
380
- 'createDataStore',
381
- 'getDataStore',
382
- 'listDataStores',
383
- 'deleteDataStore',
384
- 'updateDataStore',
385
- ];
270
+ const dataStoreServiceStubMethods = ['createDataStore', 'getDataStore', 'listDataStores', 'deleteDataStore', 'updateDataStore'];
386
271
  for (const methodName of dataStoreServiceStubMethods) {
387
272
  const callPromise = this.dataStoreServiceStub.then(stub => (...args) => {
388
273
  if (this._terminated) {
@@ -407,8 +292,7 @@ class DataStoreServiceClient {
407
292
  * @returns {string} The DNS address for this service.
408
293
  */
409
294
  static get servicePath() {
410
- if (typeof process === 'object' &&
411
- typeof process.emitWarning === 'function') {
295
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
412
296
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
413
297
  }
414
298
  return 'discoveryengine.googleapis.com';
@@ -419,8 +303,7 @@ class DataStoreServiceClient {
419
303
  * @returns {string} The DNS address for this service.
420
304
  */
421
305
  static get apiEndpoint() {
422
- if (typeof process === 'object' &&
423
- typeof process.emitWarning === 'function') {
306
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
424
307
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
425
308
  }
426
309
  return 'discoveryengine.googleapis.com';
@@ -448,7 +331,9 @@ class DataStoreServiceClient {
448
331
  * @returns {string[]} List of default scopes.
449
332
  */
450
333
  static get scopes() {
451
- return ['https://www.googleapis.com/auth/cloud-platform'];
334
+ return [
335
+ 'https://www.googleapis.com/auth/cloud-platform'
336
+ ];
452
337
  }
453
338
  /**
454
339
  * Return the project ID used by this class.
@@ -474,13 +359,10 @@ class DataStoreServiceClient {
474
359
  options = options || {};
475
360
  options.otherArgs = options.otherArgs || {};
476
361
  options.otherArgs.headers = options.otherArgs.headers || {};
477
- options.otherArgs.headers['x-goog-request-params'] =
478
- this._gaxModule.routingHeader.fromParams({
479
- name: request.name ?? '',
480
- });
481
- this.initialize().catch(err => {
482
- throw err;
362
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
363
+ 'name': request.name ?? '',
483
364
  });
365
+ this.initialize().catch(err => { throw err; });
484
366
  this._log.info('getDataStore request %j', request);
485
367
  const wrappedCallback = callback
486
368
  ? (error, response, options, rawResponse) => {
@@ -488,11 +370,16 @@ class DataStoreServiceClient {
488
370
  callback(error, response, options, rawResponse); // We verified callback above.
489
371
  }
490
372
  : undefined;
491
- return this.innerApiCalls
492
- .getDataStore(request, options, wrappedCallback)
373
+ return this.innerApiCalls.getDataStore(request, options, wrappedCallback)
493
374
  ?.then(([response, options, rawResponse]) => {
494
375
  this._log.info('getDataStore response %j', response);
495
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;
496
383
  });
497
384
  }
498
385
  updateDataStore(request, optionsOrCallback, callback) {
@@ -508,13 +395,10 @@ class DataStoreServiceClient {
508
395
  options = options || {};
509
396
  options.otherArgs = options.otherArgs || {};
510
397
  options.otherArgs.headers = options.otherArgs.headers || {};
511
- options.otherArgs.headers['x-goog-request-params'] =
512
- this._gaxModule.routingHeader.fromParams({
513
- 'data_store.name': request.dataStore.name ?? '',
514
- });
515
- this.initialize().catch(err => {
516
- throw err;
398
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
399
+ 'data_store.name': request.dataStore.name ?? '',
517
400
  });
401
+ this.initialize().catch(err => { throw err; });
518
402
  this._log.info('updateDataStore request %j', request);
519
403
  const wrappedCallback = callback
520
404
  ? (error, response, options, rawResponse) => {
@@ -522,11 +406,16 @@ class DataStoreServiceClient {
522
406
  callback(error, response, options, rawResponse); // We verified callback above.
523
407
  }
524
408
  : undefined;
525
- return this.innerApiCalls
526
- .updateDataStore(request, options, wrappedCallback)
409
+ return this.innerApiCalls.updateDataStore(request, options, wrappedCallback)
527
410
  ?.then(([response, options, rawResponse]) => {
528
411
  this._log.info('updateDataStore response %j', response);
529
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;
530
419
  });
531
420
  }
532
421
  createDataStore(request, optionsOrCallback, callback) {
@@ -542,13 +431,10 @@ class DataStoreServiceClient {
542
431
  options = options || {};
543
432
  options.otherArgs = options.otherArgs || {};
544
433
  options.otherArgs.headers = options.otherArgs.headers || {};
545
- options.otherArgs.headers['x-goog-request-params'] =
546
- this._gaxModule.routingHeader.fromParams({
547
- parent: request.parent ?? '',
548
- });
549
- this.initialize().catch(err => {
550
- throw err;
434
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
435
+ 'parent': request.parent ?? '',
551
436
  });
437
+ this.initialize().catch(err => { throw err; });
552
438
  const wrappedCallback = callback
553
439
  ? (error, response, rawResponse, _) => {
554
440
  this._log.info('createDataStore response %j', rawResponse);
@@ -556,8 +442,7 @@ class DataStoreServiceClient {
556
442
  }
557
443
  : undefined;
558
444
  this._log.info('createDataStore request %j', request);
559
- return this.innerApiCalls
560
- .createDataStore(request, options, wrappedCallback)
445
+ return this.innerApiCalls.createDataStore(request, options, wrappedCallback)
561
446
  ?.then(([response, rawResponse, _]) => {
562
447
  this._log.info('createDataStore response %j', rawResponse);
563
448
  return [response, rawResponse, _];
@@ -594,13 +479,10 @@ class DataStoreServiceClient {
594
479
  options = options || {};
595
480
  options.otherArgs = options.otherArgs || {};
596
481
  options.otherArgs.headers = options.otherArgs.headers || {};
597
- options.otherArgs.headers['x-goog-request-params'] =
598
- this._gaxModule.routingHeader.fromParams({
599
- name: request.name ?? '',
600
- });
601
- this.initialize().catch(err => {
602
- throw err;
482
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
483
+ 'name': request.name ?? '',
603
484
  });
485
+ this.initialize().catch(err => { throw err; });
604
486
  const wrappedCallback = callback
605
487
  ? (error, response, rawResponse, _) => {
606
488
  this._log.info('deleteDataStore response %j', rawResponse);
@@ -608,8 +490,7 @@ class DataStoreServiceClient {
608
490
  }
609
491
  : undefined;
610
492
  this._log.info('deleteDataStore request %j', request);
611
- return this.innerApiCalls
612
- .deleteDataStore(request, options, wrappedCallback)
493
+ return this.innerApiCalls.deleteDataStore(request, options, wrappedCallback)
613
494
  ?.then(([response, rawResponse, _]) => {
614
495
  this._log.info('deleteDataStore response %j', rawResponse);
615
496
  return [response, rawResponse, _];
@@ -646,13 +527,10 @@ class DataStoreServiceClient {
646
527
  options = options || {};
647
528
  options.otherArgs = options.otherArgs || {};
648
529
  options.otherArgs.headers = options.otherArgs.headers || {};
649
- options.otherArgs.headers['x-goog-request-params'] =
650
- this._gaxModule.routingHeader.fromParams({
651
- parent: request.parent ?? '',
652
- });
653
- this.initialize().catch(err => {
654
- throw err;
530
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
531
+ 'parent': request.parent ?? '',
655
532
  });
533
+ this.initialize().catch(err => { throw err; });
656
534
  const wrappedCallback = callback
657
535
  ? (error, values, nextPageRequest, rawResponse) => {
658
536
  this._log.info('listDataStores values %j', values);
@@ -715,15 +593,12 @@ class DataStoreServiceClient {
715
593
  options = options || {};
716
594
  options.otherArgs = options.otherArgs || {};
717
595
  options.otherArgs.headers = options.otherArgs.headers || {};
718
- options.otherArgs.headers['x-goog-request-params'] =
719
- this._gaxModule.routingHeader.fromParams({
720
- parent: request.parent ?? '',
721
- });
596
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
597
+ 'parent': request.parent ?? '',
598
+ });
722
599
  const defaultCallSettings = this._defaults['listDataStores'];
723
600
  const callSettings = defaultCallSettings.merge(options);
724
- this.initialize().catch(err => {
725
- throw err;
726
- });
601
+ this.initialize().catch(err => { throw err; });
727
602
  this._log.info('listDataStores stream %j', request);
728
603
  return this.descriptors.page.listDataStores.createStream(this.innerApiCalls.listDataStores, request, callSettings);
729
604
  }
@@ -778,103 +653,100 @@ class DataStoreServiceClient {
778
653
  options = options || {};
779
654
  options.otherArgs = options.otherArgs || {};
780
655
  options.otherArgs.headers = options.otherArgs.headers || {};
781
- options.otherArgs.headers['x-goog-request-params'] =
782
- this._gaxModule.routingHeader.fromParams({
783
- parent: request.parent ?? '',
784
- });
656
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
657
+ 'parent': request.parent ?? '',
658
+ });
785
659
  const defaultCallSettings = this._defaults['listDataStores'];
786
660
  const callSettings = defaultCallSettings.merge(options);
787
- this.initialize().catch(err => {
788
- throw err;
789
- });
661
+ this.initialize().catch(err => { throw err; });
790
662
  this._log.info('listDataStores iterate %j', request);
791
663
  return this.descriptors.page.listDataStores.asyncIterate(this.innerApiCalls['listDataStores'], request, callSettings);
792
664
  }
793
665
  /**
794
- * Gets information about a location.
795
- *
796
- * @param {Object} request
797
- * The request object that will be sent.
798
- * @param {string} request.name
799
- * Resource name for the location.
800
- * @param {object} [options]
801
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
802
- * @returns {Promise} - The promise which resolves to an array.
803
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
804
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
805
- * for more details and examples.
806
- * @example
807
- * ```
808
- * const [response] = await client.getLocation(request);
809
- * ```
810
- */
666
+ * Gets information about a location.
667
+ *
668
+ * @param {Object} request
669
+ * The request object that will be sent.
670
+ * @param {string} request.name
671
+ * Resource name for the location.
672
+ * @param {object} [options]
673
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
674
+ * @returns {Promise} - The promise which resolves to an array.
675
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
676
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
677
+ * for more details and examples.
678
+ * @example
679
+ * ```
680
+ * const [response] = await client.getLocation(request);
681
+ * ```
682
+ */
811
683
  getLocation(request, options, callback) {
812
684
  return this.locationsClient.getLocation(request, options, callback);
813
685
  }
814
686
  /**
815
- * Lists information about the supported locations for this service. Returns an iterable object.
816
- *
817
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
818
- * @param {Object} request
819
- * The request object that will be sent.
820
- * @param {string} request.name
821
- * The resource that owns the locations collection, if applicable.
822
- * @param {string} request.filter
823
- * The standard list filter.
824
- * @param {number} request.pageSize
825
- * The standard list page size.
826
- * @param {string} request.pageToken
827
- * The standard list page token.
828
- * @param {object} [options]
829
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
830
- * @returns {Object}
831
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
832
- * When you iterate the returned iterable, each element will be an object representing
833
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
834
- * so you can stop the iteration when you don't need more results.
835
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
836
- * for more details and examples.
837
- * @example
838
- * ```
839
- * const iterable = client.listLocationsAsync(request);
840
- * for await (const response of iterable) {
841
- * // process response
842
- * }
843
- * ```
844
- */
687
+ * Lists information about the supported locations for this service. Returns an iterable object.
688
+ *
689
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
690
+ * @param {Object} request
691
+ * The request object that will be sent.
692
+ * @param {string} request.name
693
+ * The resource that owns the locations collection, if applicable.
694
+ * @param {string} request.filter
695
+ * The standard list filter.
696
+ * @param {number} request.pageSize
697
+ * The standard list page size.
698
+ * @param {string} request.pageToken
699
+ * The standard list page token.
700
+ * @param {object} [options]
701
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
702
+ * @returns {Object}
703
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
704
+ * When you iterate the returned iterable, each element will be an object representing
705
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
706
+ * so you can stop the iteration when you don't need more results.
707
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
708
+ * for more details and examples.
709
+ * @example
710
+ * ```
711
+ * const iterable = client.listLocationsAsync(request);
712
+ * for await (const response of iterable) {
713
+ * // process response
714
+ * }
715
+ * ```
716
+ */
845
717
  listLocationsAsync(request, options) {
846
718
  return this.locationsClient.listLocationsAsync(request, options);
847
719
  }
848
720
  /**
849
- * Gets the latest state of a long-running operation. Clients can use this
850
- * method to poll the operation result at intervals as recommended by the API
851
- * service.
852
- *
853
- * @param {Object} request - The request object that will be sent.
854
- * @param {string} request.name - The name of the operation resource.
855
- * @param {Object=} options
856
- * Optional parameters. You can override the default settings for this call,
857
- * e.g, timeout, retries, paginations, etc. See {@link
858
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
859
- * for the details.
860
- * @param {function(?Error, ?Object)=} callback
861
- * The function which will be called with the result of the API call.
862
- *
863
- * The second parameter to the callback is an object representing
864
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
865
- * @return {Promise} - The promise which resolves to an array.
866
- * The first element of the array is an object representing
867
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
868
- * The promise has a method named "cancel" which cancels the ongoing API call.
869
- *
870
- * @example
871
- * ```
872
- * const client = longrunning.operationsClient();
873
- * const name = '';
874
- * const [response] = await client.getOperation({name});
875
- * // doThingsWith(response)
876
- * ```
877
- */
721
+ * Gets the latest state of a long-running operation. Clients can use this
722
+ * method to poll the operation result at intervals as recommended by the API
723
+ * service.
724
+ *
725
+ * @param {Object} request - The request object that will be sent.
726
+ * @param {string} request.name - The name of the operation resource.
727
+ * @param {Object=} options
728
+ * Optional parameters. You can override the default settings for this call,
729
+ * e.g, timeout, retries, paginations, etc. See {@link
730
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
731
+ * for the details.
732
+ * @param {function(?Error, ?Object)=} callback
733
+ * The function which will be called with the result of the API call.
734
+ *
735
+ * The second parameter to the callback is an object representing
736
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
737
+ * @return {Promise} - The promise which resolves to an array.
738
+ * The first element of the array is an object representing
739
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
740
+ * The promise has a method named "cancel" which cancels the ongoing API call.
741
+ *
742
+ * @example
743
+ * ```
744
+ * const client = longrunning.operationsClient();
745
+ * const name = '';
746
+ * const [response] = await client.getOperation({name});
747
+ * // doThingsWith(response)
748
+ * ```
749
+ */
878
750
  getOperation(request, optionsOrCallback, callback) {
879
751
  let options;
880
752
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1051,8 +923,7 @@ class DataStoreServiceClient {
1051
923
  * @returns {string} A string representing the project.
1052
924
  */
1053
925
  matchProjectFromCollectionName(collectionName) {
1054
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1055
- .project;
926
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
1056
927
  }
1057
928
  /**
1058
929
  * Parse the location from Collection resource.
@@ -1062,8 +933,7 @@ class DataStoreServiceClient {
1062
933
  * @returns {string} A string representing the location.
1063
934
  */
1064
935
  matchLocationFromCollectionName(collectionName) {
1065
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1066
- .location;
936
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
1067
937
  }
1068
938
  /**
1069
939
  * Parse the collection from Collection resource.
@@ -1073,8 +943,7 @@ class DataStoreServiceClient {
1073
943
  * @returns {string} A string representing the collection.
1074
944
  */
1075
945
  matchCollectionFromCollectionName(collectionName) {
1076
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1077
- .collection;
946
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
1078
947
  }
1079
948
  /**
1080
949
  * Return a fully-qualified engine resource name string.
@@ -1133,6 +1002,51 @@ class DataStoreServiceClient {
1133
1002
  matchEngineFromEngineName(engineName) {
1134
1003
  return this.pathTemplates.enginePathTemplate.match(engineName).engine;
1135
1004
  }
1005
+ /**
1006
+ * Return a fully-qualified identityMappingStore resource name string.
1007
+ *
1008
+ * @param {string} project
1009
+ * @param {string} location
1010
+ * @param {string} identity_mapping_store
1011
+ * @returns {string} Resource name string.
1012
+ */
1013
+ identityMappingStorePath(project, location, identityMappingStore) {
1014
+ return this.pathTemplates.identityMappingStorePathTemplate.render({
1015
+ project: project,
1016
+ location: location,
1017
+ identity_mapping_store: identityMappingStore,
1018
+ });
1019
+ }
1020
+ /**
1021
+ * Parse the project from IdentityMappingStore resource.
1022
+ *
1023
+ * @param {string} identityMappingStoreName
1024
+ * A fully-qualified path representing IdentityMappingStore resource.
1025
+ * @returns {string} A string representing the project.
1026
+ */
1027
+ matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
1028
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
1029
+ }
1030
+ /**
1031
+ * Parse the location from IdentityMappingStore resource.
1032
+ *
1033
+ * @param {string} identityMappingStoreName
1034
+ * A fully-qualified path representing IdentityMappingStore resource.
1035
+ * @returns {string} A string representing the location.
1036
+ */
1037
+ matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
1038
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
1039
+ }
1040
+ /**
1041
+ * Parse the identity_mapping_store from IdentityMappingStore resource.
1042
+ *
1043
+ * @param {string} identityMappingStoreName
1044
+ * A fully-qualified path representing IdentityMappingStore resource.
1045
+ * @returns {string} A string representing the identity_mapping_store.
1046
+ */
1047
+ matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
1048
+ return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
1049
+ }
1136
1050
  /**
1137
1051
  * Return a fully-qualified project resource name string.
1138
1052
  *
@@ -1154,6 +1068,84 @@ class DataStoreServiceClient {
1154
1068
  matchProjectFromProjectName(projectName) {
1155
1069
  return this.pathTemplates.projectPathTemplate.match(projectName).project;
1156
1070
  }
1071
+ /**
1072
+ * Return a fully-qualified projectLocationCmekConfig resource name string.
1073
+ *
1074
+ * @param {string} project
1075
+ * @param {string} location
1076
+ * @returns {string} Resource name string.
1077
+ */
1078
+ projectLocationCmekConfigPath(project, location) {
1079
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
1080
+ project: project,
1081
+ location: location,
1082
+ });
1083
+ }
1084
+ /**
1085
+ * Parse the project from ProjectLocationCmekConfig resource.
1086
+ *
1087
+ * @param {string} projectLocationCmekConfigName
1088
+ * A fully-qualified path representing project_location_cmekConfig resource.
1089
+ * @returns {string} A string representing the project.
1090
+ */
1091
+ matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
1092
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
1093
+ }
1094
+ /**
1095
+ * Parse the location from ProjectLocationCmekConfig resource.
1096
+ *
1097
+ * @param {string} projectLocationCmekConfigName
1098
+ * A fully-qualified path representing project_location_cmekConfig resource.
1099
+ * @returns {string} A string representing the location.
1100
+ */
1101
+ matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
1102
+ return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
1103
+ }
1104
+ /**
1105
+ * Return a fully-qualified projectLocationCmekConfigs resource name string.
1106
+ *
1107
+ * @param {string} project
1108
+ * @param {string} location
1109
+ * @param {string} cmek_config
1110
+ * @returns {string} Resource name string.
1111
+ */
1112
+ projectLocationCmekConfigsPath(project, location, cmekConfig) {
1113
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
1114
+ project: project,
1115
+ location: location,
1116
+ cmek_config: cmekConfig,
1117
+ });
1118
+ }
1119
+ /**
1120
+ * Parse the project from ProjectLocationCmekConfigs resource.
1121
+ *
1122
+ * @param {string} projectLocationCmekConfigsName
1123
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1124
+ * @returns {string} A string representing the project.
1125
+ */
1126
+ matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1127
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
1128
+ }
1129
+ /**
1130
+ * Parse the location from ProjectLocationCmekConfigs resource.
1131
+ *
1132
+ * @param {string} projectLocationCmekConfigsName
1133
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1134
+ * @returns {string} A string representing the location.
1135
+ */
1136
+ matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1137
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
1138
+ }
1139
+ /**
1140
+ * Parse the cmek_config from ProjectLocationCmekConfigs resource.
1141
+ *
1142
+ * @param {string} projectLocationCmekConfigsName
1143
+ * A fully-qualified path representing project_location_cmekConfigs resource.
1144
+ * @returns {string} A string representing the cmek_config.
1145
+ */
1146
+ matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
1147
+ return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
1148
+ }
1157
1149
  /**
1158
1150
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
1159
1151
  *
@@ -3311,8 +3303,8 @@ class DataStoreServiceClient {
3311
3303
  this._log.info('ending gRPC channel');
3312
3304
  this._terminated = true;
3313
3305
  stub.close();
3314
- this.locationsClient.close();
3315
- this.operationsClient.close();
3306
+ this.locationsClient.close().catch(err => { throw err; });
3307
+ void this.operationsClient.close();
3316
3308
  });
3317
3309
  }
3318
3310
  return Promise.resolve();