@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
  }
@@ -215,130 +209,31 @@ class DataStoreServiceClient {
215
209
  // (e.g. 50 results at a time, with tokens to get subsequent
216
210
  // pages). Denote the keys used for pagination and results.
217
211
  this.descriptors.page = {
218
- listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores'),
212
+ listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
219
213
  };
220
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
214
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
221
215
  // This API contains "long-running operations", which return a
222
216
  // an Operation object that allows for tracking of the operation,
223
217
  // rather than holding a request open.
224
218
  const lroOptions = {
225
219
  auth: this.auth,
226
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
220
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
227
221
  };
228
222
  if (opts.fallback) {
229
223
  lroOptions.protoJson = protoFilesRoot;
230
- lroOptions.httpRules = [
231
- {
232
- selector: 'google.longrunning.Operations.CancelOperation',
233
- post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
234
- body: '*',
235
- additional_bindings: [
236
- {
237
- post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
238
- body: '*',
239
- },
240
- ],
241
- },
242
- {
243
- selector: 'google.longrunning.Operations.GetOperation',
244
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
245
- additional_bindings: [
246
- {
247
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
248
- },
249
- {
250
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
251
- },
252
- {
253
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
254
- },
255
- {
256
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
257
- },
258
- {
259
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
260
- },
261
- {
262
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
263
- },
264
- {
265
- get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
266
- },
267
- {
268
- get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
269
- },
270
- {
271
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
272
- },
273
- {
274
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
275
- },
276
- {
277
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
278
- },
279
- {
280
- get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}',
281
- },
282
- { get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
283
- {
284
- get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
285
- },
286
- { get: '/v1beta/{name=projects/*/operations/*}' },
287
- ],
288
- },
289
- {
290
- selector: 'google.longrunning.Operations.ListOperations',
291
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
292
- additional_bindings: [
293
- {
294
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
295
- },
296
- {
297
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
298
- },
299
- {
300
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
301
- },
302
- {
303
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
304
- },
305
- {
306
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
307
- },
308
- {
309
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
310
- },
311
- {
312
- get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
313
- },
314
- {
315
- get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
316
- },
317
- {
318
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
319
- },
320
- {
321
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
322
- },
323
- {
324
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
325
- },
326
- { get: '/v1beta/{name=projects/*/locations/*}/operations' },
327
- { get: '/v1beta/{name=projects/*}/operations' },
328
- ],
329
- },
330
- ];
224
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
225
+ }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1beta/{name=projects/*/operations/*}', }],
226
+ }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*}/operations', }, { get: '/v1beta/{name=projects/*}/operations', }],
227
+ }];
331
228
  }
332
- this.operationsClient = this._gaxModule
333
- .lro(lroOptions)
334
- .operationsClient(opts);
229
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
335
230
  const createDataStoreResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.DataStore');
336
231
  const createDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.CreateDataStoreMetadata');
337
232
  const deleteDataStoreResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
338
233
  const deleteDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.DeleteDataStoreMetadata');
339
234
  this.descriptors.longrunning = {
340
235
  createDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createDataStoreResponse.decode.bind(createDataStoreResponse), createDataStoreMetadata.decode.bind(createDataStoreMetadata)),
341
- deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata)),
236
+ deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata))
342
237
  };
343
238
  // Put together the default options sent with requests.
344
239
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.DataStoreService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -367,20 +262,13 @@ class DataStoreServiceClient {
367
262
  }
368
263
  // Put together the "service stub" for
369
264
  // google.cloud.discoveryengine.v1beta.DataStoreService.
370
- this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback
371
- ? this._protos.lookupService('google.cloud.discoveryengine.v1beta.DataStoreService')
372
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
373
- this._protos.google.cloud.discoveryengine.v1beta
374
- .DataStoreService, this._opts, this._providedCustomServicePath);
265
+ this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
266
+ this._protos.lookupService('google.cloud.discoveryengine.v1beta.DataStoreService') :
267
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
268
+ this._protos.google.cloud.discoveryengine.v1beta.DataStoreService, this._opts, this._providedCustomServicePath);
375
269
  // Iterate over each of the methods that the service provides
376
270
  // and create an API call method for each.
377
- const dataStoreServiceStubMethods = [
378
- 'createDataStore',
379
- 'getDataStore',
380
- 'listDataStores',
381
- 'deleteDataStore',
382
- 'updateDataStore',
383
- ];
271
+ const dataStoreServiceStubMethods = ['createDataStore', 'getDataStore', 'listDataStores', 'deleteDataStore', 'updateDataStore'];
384
272
  for (const methodName of dataStoreServiceStubMethods) {
385
273
  const callPromise = this.dataStoreServiceStub.then(stub => (...args) => {
386
274
  if (this._terminated) {
@@ -405,8 +293,7 @@ class DataStoreServiceClient {
405
293
  * @returns {string} The DNS address for this service.
406
294
  */
407
295
  static get servicePath() {
408
- if (typeof process === 'object' &&
409
- typeof process.emitWarning === 'function') {
296
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
410
297
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
411
298
  }
412
299
  return 'discoveryengine.googleapis.com';
@@ -417,8 +304,7 @@ class DataStoreServiceClient {
417
304
  * @returns {string} The DNS address for this service.
418
305
  */
419
306
  static get apiEndpoint() {
420
- if (typeof process === 'object' &&
421
- typeof process.emitWarning === 'function') {
307
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
422
308
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
423
309
  }
424
310
  return 'discoveryengine.googleapis.com';
@@ -446,7 +332,9 @@ class DataStoreServiceClient {
446
332
  * @returns {string[]} List of default scopes.
447
333
  */
448
334
  static get scopes() {
449
- return ['https://www.googleapis.com/auth/cloud-platform'];
335
+ return [
336
+ 'https://www.googleapis.com/auth/cloud-platform'
337
+ ];
450
338
  }
451
339
  /**
452
340
  * Return the project ID used by this class.
@@ -472,13 +360,10 @@ class DataStoreServiceClient {
472
360
  options = options || {};
473
361
  options.otherArgs = options.otherArgs || {};
474
362
  options.otherArgs.headers = options.otherArgs.headers || {};
475
- options.otherArgs.headers['x-goog-request-params'] =
476
- this._gaxModule.routingHeader.fromParams({
477
- name: request.name ?? '',
478
- });
479
- this.initialize().catch(err => {
480
- throw err;
363
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
364
+ 'name': request.name ?? '',
481
365
  });
366
+ this.initialize().catch(err => { throw err; });
482
367
  this._log.info('getDataStore request %j', request);
483
368
  const wrappedCallback = callback
484
369
  ? (error, response, options, rawResponse) => {
@@ -486,11 +371,16 @@ class DataStoreServiceClient {
486
371
  callback(error, response, options, rawResponse); // We verified callback above.
487
372
  }
488
373
  : undefined;
489
- return this.innerApiCalls
490
- .getDataStore(request, options, wrappedCallback)
374
+ return this.innerApiCalls.getDataStore(request, options, wrappedCallback)
491
375
  ?.then(([response, options, rawResponse]) => {
492
376
  this._log.info('getDataStore response %j', response);
493
377
  return [response, options, rawResponse];
378
+ }).catch((error) => {
379
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
380
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
381
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
382
+ }
383
+ throw error;
494
384
  });
495
385
  }
496
386
  updateDataStore(request, optionsOrCallback, callback) {
@@ -506,13 +396,10 @@ class DataStoreServiceClient {
506
396
  options = options || {};
507
397
  options.otherArgs = options.otherArgs || {};
508
398
  options.otherArgs.headers = options.otherArgs.headers || {};
509
- options.otherArgs.headers['x-goog-request-params'] =
510
- this._gaxModule.routingHeader.fromParams({
511
- 'data_store.name': request.dataStore.name ?? '',
512
- });
513
- this.initialize().catch(err => {
514
- throw err;
399
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
400
+ 'data_store.name': request.dataStore.name ?? '',
515
401
  });
402
+ this.initialize().catch(err => { throw err; });
516
403
  this._log.info('updateDataStore request %j', request);
517
404
  const wrappedCallback = callback
518
405
  ? (error, response, options, rawResponse) => {
@@ -520,11 +407,16 @@ class DataStoreServiceClient {
520
407
  callback(error, response, options, rawResponse); // We verified callback above.
521
408
  }
522
409
  : undefined;
523
- return this.innerApiCalls
524
- .updateDataStore(request, options, wrappedCallback)
410
+ return this.innerApiCalls.updateDataStore(request, options, wrappedCallback)
525
411
  ?.then(([response, options, rawResponse]) => {
526
412
  this._log.info('updateDataStore response %j', response);
527
413
  return [response, options, rawResponse];
414
+ }).catch((error) => {
415
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
416
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
417
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
418
+ }
419
+ throw error;
528
420
  });
529
421
  }
530
422
  createDataStore(request, optionsOrCallback, callback) {
@@ -540,13 +432,10 @@ class DataStoreServiceClient {
540
432
  options = options || {};
541
433
  options.otherArgs = options.otherArgs || {};
542
434
  options.otherArgs.headers = options.otherArgs.headers || {};
543
- options.otherArgs.headers['x-goog-request-params'] =
544
- this._gaxModule.routingHeader.fromParams({
545
- parent: request.parent ?? '',
546
- });
547
- this.initialize().catch(err => {
548
- throw err;
435
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
436
+ 'parent': request.parent ?? '',
549
437
  });
438
+ this.initialize().catch(err => { throw err; });
550
439
  const wrappedCallback = callback
551
440
  ? (error, response, rawResponse, _) => {
552
441
  this._log.info('createDataStore response %j', rawResponse);
@@ -554,8 +443,7 @@ class DataStoreServiceClient {
554
443
  }
555
444
  : undefined;
556
445
  this._log.info('createDataStore request %j', request);
557
- return this.innerApiCalls
558
- .createDataStore(request, options, wrappedCallback)
446
+ return this.innerApiCalls.createDataStore(request, options, wrappedCallback)
559
447
  ?.then(([response, rawResponse, _]) => {
560
448
  this._log.info('createDataStore response %j', rawResponse);
561
449
  return [response, rawResponse, _];
@@ -592,13 +480,10 @@ class DataStoreServiceClient {
592
480
  options = options || {};
593
481
  options.otherArgs = options.otherArgs || {};
594
482
  options.otherArgs.headers = options.otherArgs.headers || {};
595
- options.otherArgs.headers['x-goog-request-params'] =
596
- this._gaxModule.routingHeader.fromParams({
597
- name: request.name ?? '',
598
- });
599
- this.initialize().catch(err => {
600
- throw err;
483
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
484
+ 'name': request.name ?? '',
601
485
  });
486
+ this.initialize().catch(err => { throw err; });
602
487
  const wrappedCallback = callback
603
488
  ? (error, response, rawResponse, _) => {
604
489
  this._log.info('deleteDataStore response %j', rawResponse);
@@ -606,8 +491,7 @@ class DataStoreServiceClient {
606
491
  }
607
492
  : undefined;
608
493
  this._log.info('deleteDataStore request %j', request);
609
- return this.innerApiCalls
610
- .deleteDataStore(request, options, wrappedCallback)
494
+ return this.innerApiCalls.deleteDataStore(request, options, wrappedCallback)
611
495
  ?.then(([response, rawResponse, _]) => {
612
496
  this._log.info('deleteDataStore response %j', rawResponse);
613
497
  return [response, rawResponse, _];
@@ -644,13 +528,10 @@ class DataStoreServiceClient {
644
528
  options = options || {};
645
529
  options.otherArgs = options.otherArgs || {};
646
530
  options.otherArgs.headers = options.otherArgs.headers || {};
647
- options.otherArgs.headers['x-goog-request-params'] =
648
- this._gaxModule.routingHeader.fromParams({
649
- parent: request.parent ?? '',
650
- });
651
- this.initialize().catch(err => {
652
- throw err;
531
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
532
+ 'parent': request.parent ?? '',
653
533
  });
534
+ this.initialize().catch(err => { throw err; });
654
535
  const wrappedCallback = callback
655
536
  ? (error, values, nextPageRequest, rawResponse) => {
656
537
  this._log.info('listDataStores values %j', values);
@@ -714,15 +595,12 @@ class DataStoreServiceClient {
714
595
  options = options || {};
715
596
  options.otherArgs = options.otherArgs || {};
716
597
  options.otherArgs.headers = options.otherArgs.headers || {};
717
- options.otherArgs.headers['x-goog-request-params'] =
718
- this._gaxModule.routingHeader.fromParams({
719
- parent: request.parent ?? '',
720
- });
598
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
599
+ 'parent': request.parent ?? '',
600
+ });
721
601
  const defaultCallSettings = this._defaults['listDataStores'];
722
602
  const callSettings = defaultCallSettings.merge(options);
723
- this.initialize().catch(err => {
724
- throw err;
725
- });
603
+ this.initialize().catch(err => { throw err; });
726
604
  this._log.info('listDataStores stream %j', request);
727
605
  return this.descriptors.page.listDataStores.createStream(this.innerApiCalls.listDataStores, request, callSettings);
728
606
  }
@@ -778,103 +656,100 @@ class DataStoreServiceClient {
778
656
  options = options || {};
779
657
  options.otherArgs = options.otherArgs || {};
780
658
  options.otherArgs.headers = options.otherArgs.headers || {};
781
- options.otherArgs.headers['x-goog-request-params'] =
782
- this._gaxModule.routingHeader.fromParams({
783
- parent: request.parent ?? '',
784
- });
659
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
660
+ 'parent': request.parent ?? '',
661
+ });
785
662
  const defaultCallSettings = this._defaults['listDataStores'];
786
663
  const callSettings = defaultCallSettings.merge(options);
787
- this.initialize().catch(err => {
788
- throw err;
789
- });
664
+ this.initialize().catch(err => { throw err; });
790
665
  this._log.info('listDataStores iterate %j', request);
791
666
  return this.descriptors.page.listDataStores.asyncIterate(this.innerApiCalls['listDataStores'], request, callSettings);
792
667
  }
793
668
  /**
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
- */
669
+ * Gets information about a location.
670
+ *
671
+ * @param {Object} request
672
+ * The request object that will be sent.
673
+ * @param {string} request.name
674
+ * Resource name for the location.
675
+ * @param {object} [options]
676
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
677
+ * @returns {Promise} - The promise which resolves to an array.
678
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
679
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
680
+ * for more details and examples.
681
+ * @example
682
+ * ```
683
+ * const [response] = await client.getLocation(request);
684
+ * ```
685
+ */
811
686
  getLocation(request, options, callback) {
812
687
  return this.locationsClient.getLocation(request, options, callback);
813
688
  }
814
689
  /**
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
- */
690
+ * Lists information about the supported locations for this service. Returns an iterable object.
691
+ *
692
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
693
+ * @param {Object} request
694
+ * The request object that will be sent.
695
+ * @param {string} request.name
696
+ * The resource that owns the locations collection, if applicable.
697
+ * @param {string} request.filter
698
+ * The standard list filter.
699
+ * @param {number} request.pageSize
700
+ * The standard list page size.
701
+ * @param {string} request.pageToken
702
+ * The standard list page token.
703
+ * @param {object} [options]
704
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
705
+ * @returns {Object}
706
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
707
+ * When you iterate the returned iterable, each element will be an object representing
708
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
709
+ * so you can stop the iteration when you don't need more results.
710
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
711
+ * for more details and examples.
712
+ * @example
713
+ * ```
714
+ * const iterable = client.listLocationsAsync(request);
715
+ * for await (const response of iterable) {
716
+ * // process response
717
+ * }
718
+ * ```
719
+ */
845
720
  listLocationsAsync(request, options) {
846
721
  return this.locationsClient.listLocationsAsync(request, options);
847
722
  }
848
723
  /**
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
- */
724
+ * Gets the latest state of a long-running operation. Clients can use this
725
+ * method to poll the operation result at intervals as recommended by the API
726
+ * service.
727
+ *
728
+ * @param {Object} request - The request object that will be sent.
729
+ * @param {string} request.name - The name of the operation resource.
730
+ * @param {Object=} options
731
+ * Optional parameters. You can override the default settings for this call,
732
+ * e.g, timeout, retries, paginations, etc. See {@link
733
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
734
+ * for the details.
735
+ * @param {function(?Error, ?Object)=} callback
736
+ * The function which will be called with the result of the API call.
737
+ *
738
+ * The second parameter to the callback is an object representing
739
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
740
+ * @return {Promise} - The promise which resolves to an array.
741
+ * The first element of the array is an object representing
742
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
743
+ * The promise has a method named "cancel" which cancels the ongoing API call.
744
+ *
745
+ * @example
746
+ * ```
747
+ * const client = longrunning.operationsClient();
748
+ * const name = '';
749
+ * const [response] = await client.getOperation({name});
750
+ * // doThingsWith(response)
751
+ * ```
752
+ */
878
753
  getOperation(request, optionsOrCallback, callback) {
879
754
  let options;
880
755
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1051,8 +926,7 @@ class DataStoreServiceClient {
1051
926
  * @returns {string} A string representing the project.
1052
927
  */
1053
928
  matchProjectFromCollectionName(collectionName) {
1054
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1055
- .project;
929
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
1056
930
  }
1057
931
  /**
1058
932
  * Parse the location from Collection resource.
@@ -1062,8 +936,7 @@ class DataStoreServiceClient {
1062
936
  * @returns {string} A string representing the location.
1063
937
  */
1064
938
  matchLocationFromCollectionName(collectionName) {
1065
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1066
- .location;
939
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
1067
940
  }
1068
941
  /**
1069
942
  * Parse the collection from Collection resource.
@@ -1073,8 +946,7 @@ class DataStoreServiceClient {
1073
946
  * @returns {string} A string representing the collection.
1074
947
  */
1075
948
  matchCollectionFromCollectionName(collectionName) {
1076
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1077
- .collection;
949
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
1078
950
  }
1079
951
  /**
1080
952
  * Return a fully-qualified engine resource name string.
@@ -1156,8 +1028,7 @@ class DataStoreServiceClient {
1156
1028
  * @returns {string} A string representing the project.
1157
1029
  */
1158
1030
  matchProjectFromEvaluationName(evaluationName) {
1159
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1160
- .project;
1031
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1161
1032
  }
1162
1033
  /**
1163
1034
  * Parse the location from Evaluation resource.
@@ -1167,8 +1038,7 @@ class DataStoreServiceClient {
1167
1038
  * @returns {string} A string representing the location.
1168
1039
  */
1169
1040
  matchLocationFromEvaluationName(evaluationName) {
1170
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1171
- .location;
1041
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1172
1042
  }
1173
1043
  /**
1174
1044
  * Parse the evaluation from Evaluation resource.
@@ -1178,8 +1048,7 @@ class DataStoreServiceClient {
1178
1048
  * @returns {string} A string representing the evaluation.
1179
1049
  */
1180
1050
  matchEvaluationFromEvaluationName(evaluationName) {
1181
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1182
- .evaluation;
1051
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1183
1052
  }
1184
1053
  /**
1185
1054
  * Return a fully-qualified groundingConfig resource name string.
@@ -3417,8 +3286,7 @@ class DataStoreServiceClient {
3417
3286
  * @returns {string} A string representing the project.
3418
3287
  */
3419
3288
  matchProjectFromSampleQueryName(sampleQueryName) {
3420
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3421
- .project;
3289
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3422
3290
  }
3423
3291
  /**
3424
3292
  * Parse the location from SampleQuery resource.
@@ -3428,8 +3296,7 @@ class DataStoreServiceClient {
3428
3296
  * @returns {string} A string representing the location.
3429
3297
  */
3430
3298
  matchLocationFromSampleQueryName(sampleQueryName) {
3431
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3432
- .location;
3299
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3433
3300
  }
3434
3301
  /**
3435
3302
  * Parse the sample_query_set from SampleQuery resource.
@@ -3439,8 +3306,7 @@ class DataStoreServiceClient {
3439
3306
  * @returns {string} A string representing the sample_query_set.
3440
3307
  */
3441
3308
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3442
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3443
- .sample_query_set;
3309
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3444
3310
  }
3445
3311
  /**
3446
3312
  * Parse the sample_query from SampleQuery resource.
@@ -3450,8 +3316,7 @@ class DataStoreServiceClient {
3450
3316
  * @returns {string} A string representing the sample_query.
3451
3317
  */
3452
3318
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3453
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3454
- .sample_query;
3319
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3455
3320
  }
3456
3321
  /**
3457
3322
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3510,8 +3375,8 @@ class DataStoreServiceClient {
3510
3375
  this._log.info('ending gRPC channel');
3511
3376
  this._terminated = true;
3512
3377
  stub.close();
3513
- this.locationsClient.close();
3514
- this.operationsClient.close();
3378
+ this.locationsClient.close().catch(err => { throw err; });
3379
+ void this.operationsClient.close();
3515
3380
  });
3516
3381
  }
3517
3382
  return Promise.resolve();