@google-cloud/discoveryengine 2.0.1 → 2.2.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 (167) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +7 -2
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
  9. package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
  10. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
  12. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
  13. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
  15. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
  16. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
  17. package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
  19. package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
  21. package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
  23. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
  24. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
  26. package/build/protos/protos.d.ts +4390 -300
  27. package/build/protos/protos.js +13785 -2922
  28. package/build/protos/protos.json +1355 -14
  29. package/build/src/index.d.ts +4 -1
  30. package/build/src/index.js +4 -21
  31. package/build/src/v1/completion_service_client.d.ts +313 -76
  32. package/build/src/v1/completion_service_client.js +451 -262
  33. package/build/src/v1/completion_service_proto_list.json +3 -0
  34. package/build/src/v1/control_service_client.d.ts +318 -81
  35. package/build/src/v1/control_service_client.js +422 -132
  36. package/build/src/v1/control_service_proto_list.json +3 -0
  37. package/build/src/v1/conversational_search_service_client.d.ts +341 -134
  38. package/build/src/v1/conversational_search_service_client.js +395 -223
  39. package/build/src/v1/conversational_search_service_client_config.json +5 -0
  40. package/build/src/v1/conversational_search_service_proto_list.json +3 -0
  41. package/build/src/v1/data_store_service_client.d.ts +359 -122
  42. package/build/src/v1/data_store_service_client.js +460 -280
  43. package/build/src/v1/data_store_service_proto_list.json +3 -0
  44. package/build/src/v1/document_service_client.d.ts +364 -121
  45. package/build/src/v1/document_service_client.js +469 -300
  46. package/build/src/v1/document_service_proto_list.json +3 -0
  47. package/build/src/v1/engine_service_client.d.ts +340 -103
  48. package/build/src/v1/engine_service_client.js +460 -279
  49. package/build/src/v1/engine_service_proto_list.json +3 -0
  50. package/build/src/v1/gapic_metadata.json +59 -0
  51. package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
  52. package/build/src/v1/grounded_generation_service_client.js +405 -100
  53. package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
  54. package/build/src/v1/index.d.ts +1 -0
  55. package/build/src/v1/index.js +3 -1
  56. package/build/src/v1/project_service_client.d.ts +313 -76
  57. package/build/src/v1/project_service_client.js +434 -222
  58. package/build/src/v1/project_service_proto_list.json +3 -0
  59. package/build/src/v1/rank_service_client.d.ts +285 -48
  60. package/build/src/v1/rank_service_client.js +398 -85
  61. package/build/src/v1/rank_service_proto_list.json +3 -0
  62. package/build/src/v1/recommendation_service_client.d.ts +142 -49
  63. package/build/src/v1/recommendation_service_client.js +198 -82
  64. package/build/src/v1/recommendation_service_proto_list.json +3 -0
  65. package/build/src/v1/schema_service_client.d.ts +348 -111
  66. package/build/src/v1/schema_service_client.js +457 -273
  67. package/build/src/v1/schema_service_proto_list.json +3 -0
  68. package/build/src/v1/search_service_client.d.ts +748 -559
  69. package/build/src/v1/search_service_client.js +302 -133
  70. package/build/src/v1/search_service_proto_list.json +3 -0
  71. package/build/src/v1/search_tuning_service_client.d.ts +314 -77
  72. package/build/src/v1/search_tuning_service_client.js +439 -235
  73. package/build/src/v1/search_tuning_service_proto_list.json +3 -0
  74. package/build/src/v1/serving_config_service_client.d.ts +1851 -0
  75. package/build/src/v1/serving_config_service_client.js +2642 -0
  76. package/build/src/v1/serving_config_service_client_config.json +30 -0
  77. package/build/src/v1/serving_config_service_proto_list.json +39 -0
  78. package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
  79. package/build/src/v1/site_search_engine_service_client.js +625 -351
  80. package/build/src/v1/site_search_engine_service_client_config.json +12 -0
  81. package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
  82. package/build/src/v1/user_event_service_client.d.ts +335 -86
  83. package/build/src/v1/user_event_service_client.js +447 -253
  84. package/build/src/v1/user_event_service_proto_list.json +3 -0
  85. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  86. package/build/src/v1alpha/acl_config_service_client.js +82 -106
  87. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  88. package/build/src/v1alpha/chunk_service_client.js +92 -120
  89. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  90. package/build/src/v1alpha/completion_service_client.js +134 -280
  91. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  92. package/build/src/v1alpha/control_service_client.js +105 -151
  93. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  94. package/build/src/v1alpha/conversational_search_service_client.js +145 -237
  95. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  96. package/build/src/v1alpha/data_store_service_client.js +151 -316
  97. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  98. package/build/src/v1alpha/document_service_client.js +156 -328
  99. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  100. package/build/src/v1alpha/engine_service_client.js +155 -325
  101. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  102. package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
  103. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  104. package/build/src/v1alpha/evaluation_service_client.js +143 -295
  105. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  106. package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
  107. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  108. package/build/src/v1alpha/project_service_client.js +126 -262
  109. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  110. package/build/src/v1alpha/rank_service_client.js +81 -104
  111. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  112. package/build/src/v1alpha/recommendation_service_client.js +79 -100
  113. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  114. package/build/src/v1alpha/sample_query_service_client.js +144 -301
  115. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  116. package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
  117. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  118. package/build/src/v1alpha/schema_service_client.js +140 -292
  119. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  120. package/build/src/v1alpha/search_service_client.js +88 -112
  121. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  122. package/build/src/v1alpha/search_tuning_service_client.js +122 -253
  123. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  124. package/build/src/v1alpha/serving_config_service_client.js +97 -133
  125. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  126. package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
  127. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  128. package/build/src/v1alpha/user_event_service_client.js +130 -271
  129. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  130. package/build/src/v1beta/completion_service_client.js +136 -279
  131. package/build/src/v1beta/control_service_client.d.ts +84 -84
  132. package/build/src/v1beta/control_service_client.js +103 -147
  133. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  134. package/build/src/v1beta/conversational_search_service_client.js +143 -233
  135. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  136. package/build/src/v1beta/data_store_service_client.js +141 -288
  137. package/build/src/v1beta/document_service_client.d.ts +124 -124
  138. package/build/src/v1beta/document_service_client.js +150 -309
  139. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  140. package/build/src/v1beta/engine_service_client.js +153 -315
  141. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  142. package/build/src/v1beta/evaluation_service_client.js +141 -285
  143. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  144. package/build/src/v1beta/grounded_generation_service_client.js +86 -114
  145. package/build/src/v1beta/project_service_client.d.ts +76 -76
  146. package/build/src/v1beta/project_service_client.js +115 -231
  147. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  148. package/build/src/v1beta/rank_service_client.js +79 -99
  149. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  150. package/build/src/v1beta/recommendation_service_client.js +77 -96
  151. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  152. package/build/src/v1beta/sample_query_service_client.js +142 -291
  153. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  154. package/build/src/v1beta/sample_query_set_service_client.js +104 -149
  155. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  156. package/build/src/v1beta/schema_service_client.js +138 -282
  157. package/build/src/v1beta/search_service_client.d.ts +665 -665
  158. package/build/src/v1beta/search_service_client.js +97 -128
  159. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  160. package/build/src/v1beta/search_tuning_service_client.js +120 -243
  161. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  162. package/build/src/v1beta/serving_config_service_client.js +95 -129
  163. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  164. package/build/src/v1beta/site_search_engine_service_client.js +186 -386
  165. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  166. package/build/src/v1beta/user_event_service_client.js +128 -261
  167. package/package.json +4 -4
@@ -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
  }
@@ -213,7 +207,7 @@ class DataStoreServiceClient {
213
207
  // (e.g. 50 results at a time, with tokens to get subsequent
214
208
  // pages). Denote the keys used for pagination and results.
215
209
  this.descriptors.page = {
216
- listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores'),
210
+ listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores')
217
211
  };
218
212
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
219
213
  // This API contains "long-running operations", which return a
@@ -221,128 +215,23 @@ class DataStoreServiceClient {
221
215
  // rather than holding a request open.
222
216
  const lroOptions = {
223
217
  auth: this.auth,
224
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
218
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
225
219
  };
226
220
  if (opts.fallback) {
227
221
  lroOptions.protoJson = protoFilesRoot;
228
- lroOptions.httpRules = [
229
- {
230
- selector: 'google.longrunning.Operations.CancelOperation',
231
- post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
232
- body: '*',
233
- additional_bindings: [
234
- {
235
- post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
236
- body: '*',
237
- },
238
- ],
239
- },
240
- {
241
- selector: 'google.longrunning.Operations.GetOperation',
242
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
243
- additional_bindings: [
244
- {
245
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
246
- },
247
- {
248
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
249
- },
250
- {
251
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
252
- },
253
- {
254
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
255
- },
256
- {
257
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
258
- },
259
- {
260
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
261
- },
262
- {
263
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
264
- },
265
- {
266
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
267
- },
268
- {
269
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
270
- },
271
- {
272
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
273
- },
274
- {
275
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
276
- },
277
- {
278
- get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
279
- },
280
- {
281
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
282
- },
283
- { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
284
- {
285
- get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
286
- },
287
- { get: '/v1alpha/{name=projects/*/operations/*}' },
288
- ],
289
- },
290
- {
291
- selector: 'google.longrunning.Operations.ListOperations',
292
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
293
- additional_bindings: [
294
- {
295
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
296
- },
297
- {
298
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
299
- },
300
- {
301
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
302
- },
303
- {
304
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
305
- },
306
- {
307
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
308
- },
309
- {
310
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
311
- },
312
- {
313
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
314
- },
315
- {
316
- get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
317
- },
318
- {
319
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
320
- },
321
- {
322
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
323
- },
324
- {
325
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
326
- },
327
- {
328
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
329
- },
330
- { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
331
- { get: '/v1alpha/{name=projects/*}/operations' },
332
- ],
333
- },
334
- ];
222
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
223
+ }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/operations/*}', }],
224
+ }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*}/operations', }, { get: '/v1alpha/{name=projects/*}/operations', }],
225
+ }];
335
226
  }
336
- this.operationsClient = this._gaxModule
337
- .lro(lroOptions)
338
- .operationsClient(opts);
227
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
339
228
  const createDataStoreResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.DataStore');
340
229
  const createDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateDataStoreMetadata');
341
230
  const deleteDataStoreResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
342
231
  const deleteDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.DeleteDataStoreMetadata');
343
232
  this.descriptors.longrunning = {
344
233
  createDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createDataStoreResponse.decode.bind(createDataStoreResponse), createDataStoreMetadata.decode.bind(createDataStoreMetadata)),
345
- deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata)),
234
+ deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata))
346
235
  };
347
236
  // Put together the default options sent with requests.
348
237
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.DataStoreService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -371,22 +260,13 @@ class DataStoreServiceClient {
371
260
  }
372
261
  // Put together the "service stub" for
373
262
  // google.cloud.discoveryengine.v1alpha.DataStoreService.
374
- this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback
375
- ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.DataStoreService')
376
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
377
- this._protos.google.cloud.discoveryengine.v1alpha
378
- .DataStoreService, this._opts, this._providedCustomServicePath);
263
+ this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
264
+ this._protos.lookupService('google.cloud.discoveryengine.v1alpha.DataStoreService') :
265
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
266
+ this._protos.google.cloud.discoveryengine.v1alpha.DataStoreService, this._opts, this._providedCustomServicePath);
379
267
  // Iterate over each of the methods that the service provides
380
268
  // and create an API call method for each.
381
- const dataStoreServiceStubMethods = [
382
- 'createDataStore',
383
- 'getDataStore',
384
- 'listDataStores',
385
- 'deleteDataStore',
386
- 'updateDataStore',
387
- 'getDocumentProcessingConfig',
388
- 'updateDocumentProcessingConfig',
389
- ];
269
+ const dataStoreServiceStubMethods = ['createDataStore', 'getDataStore', 'listDataStores', 'deleteDataStore', 'updateDataStore', 'getDocumentProcessingConfig', 'updateDocumentProcessingConfig'];
390
270
  for (const methodName of dataStoreServiceStubMethods) {
391
271
  const callPromise = this.dataStoreServiceStub.then(stub => (...args) => {
392
272
  if (this._terminated) {
@@ -411,8 +291,7 @@ class DataStoreServiceClient {
411
291
  * @returns {string} The DNS address for this service.
412
292
  */
413
293
  static get servicePath() {
414
- if (typeof process === 'object' &&
415
- typeof process.emitWarning === 'function') {
294
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
416
295
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
417
296
  }
418
297
  return 'discoveryengine.googleapis.com';
@@ -423,8 +302,7 @@ class DataStoreServiceClient {
423
302
  * @returns {string} The DNS address for this service.
424
303
  */
425
304
  static get apiEndpoint() {
426
- if (typeof process === 'object' &&
427
- typeof process.emitWarning === 'function') {
305
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
428
306
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
429
307
  }
430
308
  return 'discoveryengine.googleapis.com';
@@ -452,7 +330,9 @@ class DataStoreServiceClient {
452
330
  * @returns {string[]} List of default scopes.
453
331
  */
454
332
  static get scopes() {
455
- return ['https://www.googleapis.com/auth/cloud-platform'];
333
+ return [
334
+ 'https://www.googleapis.com/auth/cloud-platform'
335
+ ];
456
336
  }
457
337
  /**
458
338
  * Return the project ID used by this class.
@@ -478,13 +358,10 @@ class DataStoreServiceClient {
478
358
  options = options || {};
479
359
  options.otherArgs = options.otherArgs || {};
480
360
  options.otherArgs.headers = options.otherArgs.headers || {};
481
- options.otherArgs.headers['x-goog-request-params'] =
482
- this._gaxModule.routingHeader.fromParams({
483
- name: request.name ?? '',
484
- });
485
- this.initialize().catch(err => {
486
- throw err;
361
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
362
+ 'name': request.name ?? '',
487
363
  });
364
+ this.initialize().catch(err => { throw err; });
488
365
  this._log.info('getDataStore request %j', request);
489
366
  const wrappedCallback = callback
490
367
  ? (error, response, options, rawResponse) => {
@@ -492,8 +369,7 @@ class DataStoreServiceClient {
492
369
  callback(error, response, options, rawResponse); // We verified callback above.
493
370
  }
494
371
  : undefined;
495
- return this.innerApiCalls
496
- .getDataStore(request, options, wrappedCallback)
372
+ return this.innerApiCalls.getDataStore(request, options, wrappedCallback)
497
373
  ?.then(([response, options, rawResponse]) => {
498
374
  this._log.info('getDataStore response %j', response);
499
375
  return [response, options, rawResponse];
@@ -512,13 +388,10 @@ class DataStoreServiceClient {
512
388
  options = options || {};
513
389
  options.otherArgs = options.otherArgs || {};
514
390
  options.otherArgs.headers = options.otherArgs.headers || {};
515
- options.otherArgs.headers['x-goog-request-params'] =
516
- this._gaxModule.routingHeader.fromParams({
517
- 'data_store.name': request.dataStore.name ?? '',
518
- });
519
- this.initialize().catch(err => {
520
- throw err;
391
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
392
+ 'data_store.name': request.dataStore.name ?? '',
521
393
  });
394
+ this.initialize().catch(err => { throw err; });
522
395
  this._log.info('updateDataStore request %j', request);
523
396
  const wrappedCallback = callback
524
397
  ? (error, response, options, rawResponse) => {
@@ -526,8 +399,7 @@ class DataStoreServiceClient {
526
399
  callback(error, response, options, rawResponse); // We verified callback above.
527
400
  }
528
401
  : undefined;
529
- return this.innerApiCalls
530
- .updateDataStore(request, options, wrappedCallback)
402
+ return this.innerApiCalls.updateDataStore(request, options, wrappedCallback)
531
403
  ?.then(([response, options, rawResponse]) => {
532
404
  this._log.info('updateDataStore response %j', response);
533
405
  return [response, options, rawResponse];
@@ -546,13 +418,10 @@ class DataStoreServiceClient {
546
418
  options = options || {};
547
419
  options.otherArgs = options.otherArgs || {};
548
420
  options.otherArgs.headers = options.otherArgs.headers || {};
549
- options.otherArgs.headers['x-goog-request-params'] =
550
- this._gaxModule.routingHeader.fromParams({
551
- name: request.name ?? '',
552
- });
553
- this.initialize().catch(err => {
554
- throw err;
421
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
422
+ 'name': request.name ?? '',
555
423
  });
424
+ this.initialize().catch(err => { throw err; });
556
425
  this._log.info('getDocumentProcessingConfig request %j', request);
557
426
  const wrappedCallback = callback
558
427
  ? (error, response, options, rawResponse) => {
@@ -560,8 +429,7 @@ class DataStoreServiceClient {
560
429
  callback(error, response, options, rawResponse); // We verified callback above.
561
430
  }
562
431
  : undefined;
563
- return this.innerApiCalls
564
- .getDocumentProcessingConfig(request, options, wrappedCallback)
432
+ return this.innerApiCalls.getDocumentProcessingConfig(request, options, wrappedCallback)
565
433
  ?.then(([response, options, rawResponse]) => {
566
434
  this._log.info('getDocumentProcessingConfig response %j', response);
567
435
  return [response, options, rawResponse];
@@ -580,13 +448,10 @@ class DataStoreServiceClient {
580
448
  options = options || {};
581
449
  options.otherArgs = options.otherArgs || {};
582
450
  options.otherArgs.headers = options.otherArgs.headers || {};
583
- options.otherArgs.headers['x-goog-request-params'] =
584
- this._gaxModule.routingHeader.fromParams({
585
- 'document_processing_config.name': request.documentProcessingConfig.name ?? '',
586
- });
587
- this.initialize().catch(err => {
588
- throw err;
451
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
452
+ 'document_processing_config.name': request.documentProcessingConfig.name ?? '',
589
453
  });
454
+ this.initialize().catch(err => { throw err; });
590
455
  this._log.info('updateDocumentProcessingConfig request %j', request);
591
456
  const wrappedCallback = callback
592
457
  ? (error, response, options, rawResponse) => {
@@ -594,8 +459,7 @@ class DataStoreServiceClient {
594
459
  callback(error, response, options, rawResponse); // We verified callback above.
595
460
  }
596
461
  : undefined;
597
- return this.innerApiCalls
598
- .updateDocumentProcessingConfig(request, options, wrappedCallback)
462
+ return this.innerApiCalls.updateDocumentProcessingConfig(request, options, wrappedCallback)
599
463
  ?.then(([response, options, rawResponse]) => {
600
464
  this._log.info('updateDocumentProcessingConfig response %j', response);
601
465
  return [response, options, rawResponse];
@@ -614,13 +478,10 @@ class DataStoreServiceClient {
614
478
  options = options || {};
615
479
  options.otherArgs = options.otherArgs || {};
616
480
  options.otherArgs.headers = options.otherArgs.headers || {};
617
- options.otherArgs.headers['x-goog-request-params'] =
618
- this._gaxModule.routingHeader.fromParams({
619
- parent: request.parent ?? '',
620
- });
621
- this.initialize().catch(err => {
622
- throw err;
481
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
482
+ 'parent': request.parent ?? '',
623
483
  });
484
+ this.initialize().catch(err => { throw err; });
624
485
  const wrappedCallback = callback
625
486
  ? (error, response, rawResponse, _) => {
626
487
  this._log.info('createDataStore response %j', rawResponse);
@@ -628,8 +489,7 @@ class DataStoreServiceClient {
628
489
  }
629
490
  : undefined;
630
491
  this._log.info('createDataStore request %j', request);
631
- return this.innerApiCalls
632
- .createDataStore(request, options, wrappedCallback)
492
+ return this.innerApiCalls.createDataStore(request, options, wrappedCallback)
633
493
  ?.then(([response, rawResponse, _]) => {
634
494
  this._log.info('createDataStore response %j', rawResponse);
635
495
  return [response, rawResponse, _];
@@ -666,13 +526,10 @@ class DataStoreServiceClient {
666
526
  options = options || {};
667
527
  options.otherArgs = options.otherArgs || {};
668
528
  options.otherArgs.headers = options.otherArgs.headers || {};
669
- options.otherArgs.headers['x-goog-request-params'] =
670
- this._gaxModule.routingHeader.fromParams({
671
- name: request.name ?? '',
672
- });
673
- this.initialize().catch(err => {
674
- throw err;
529
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
530
+ 'name': request.name ?? '',
675
531
  });
532
+ this.initialize().catch(err => { throw err; });
676
533
  const wrappedCallback = callback
677
534
  ? (error, response, rawResponse, _) => {
678
535
  this._log.info('deleteDataStore response %j', rawResponse);
@@ -680,8 +537,7 @@ class DataStoreServiceClient {
680
537
  }
681
538
  : undefined;
682
539
  this._log.info('deleteDataStore request %j', request);
683
- return this.innerApiCalls
684
- .deleteDataStore(request, options, wrappedCallback)
540
+ return this.innerApiCalls.deleteDataStore(request, options, wrappedCallback)
685
541
  ?.then(([response, rawResponse, _]) => {
686
542
  this._log.info('deleteDataStore response %j', rawResponse);
687
543
  return [response, rawResponse, _];
@@ -718,13 +574,10 @@ class DataStoreServiceClient {
718
574
  options = options || {};
719
575
  options.otherArgs = options.otherArgs || {};
720
576
  options.otherArgs.headers = options.otherArgs.headers || {};
721
- options.otherArgs.headers['x-goog-request-params'] =
722
- this._gaxModule.routingHeader.fromParams({
723
- parent: request.parent ?? '',
724
- });
725
- this.initialize().catch(err => {
726
- throw err;
577
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
578
+ 'parent': request.parent ?? '',
727
579
  });
580
+ this.initialize().catch(err => { throw err; });
728
581
  const wrappedCallback = callback
729
582
  ? (error, values, nextPageRequest, rawResponse) => {
730
583
  this._log.info('listDataStores values %j', values);
@@ -788,15 +641,12 @@ class DataStoreServiceClient {
788
641
  options = options || {};
789
642
  options.otherArgs = options.otherArgs || {};
790
643
  options.otherArgs.headers = options.otherArgs.headers || {};
791
- options.otherArgs.headers['x-goog-request-params'] =
792
- this._gaxModule.routingHeader.fromParams({
793
- parent: request.parent ?? '',
794
- });
644
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
645
+ 'parent': request.parent ?? '',
646
+ });
795
647
  const defaultCallSettings = this._defaults['listDataStores'];
796
648
  const callSettings = defaultCallSettings.merge(options);
797
- this.initialize().catch(err => {
798
- throw err;
799
- });
649
+ this.initialize().catch(err => { throw err; });
800
650
  this._log.info('listDataStores stream %j', request);
801
651
  return this.descriptors.page.listDataStores.createStream(this.innerApiCalls.listDataStores, request, callSettings);
802
652
  }
@@ -852,103 +702,100 @@ class DataStoreServiceClient {
852
702
  options = options || {};
853
703
  options.otherArgs = options.otherArgs || {};
854
704
  options.otherArgs.headers = options.otherArgs.headers || {};
855
- options.otherArgs.headers['x-goog-request-params'] =
856
- this._gaxModule.routingHeader.fromParams({
857
- parent: request.parent ?? '',
858
- });
705
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
706
+ 'parent': request.parent ?? '',
707
+ });
859
708
  const defaultCallSettings = this._defaults['listDataStores'];
860
709
  const callSettings = defaultCallSettings.merge(options);
861
- this.initialize().catch(err => {
862
- throw err;
863
- });
710
+ this.initialize().catch(err => { throw err; });
864
711
  this._log.info('listDataStores iterate %j', request);
865
712
  return this.descriptors.page.listDataStores.asyncIterate(this.innerApiCalls['listDataStores'], request, callSettings);
866
713
  }
867
714
  /**
868
- * Gets information about a location.
869
- *
870
- * @param {Object} request
871
- * The request object that will be sent.
872
- * @param {string} request.name
873
- * Resource name for the location.
874
- * @param {object} [options]
875
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
876
- * @returns {Promise} - The promise which resolves to an array.
877
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
878
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
879
- * for more details and examples.
880
- * @example
881
- * ```
882
- * const [response] = await client.getLocation(request);
883
- * ```
884
- */
715
+ * Gets information about a location.
716
+ *
717
+ * @param {Object} request
718
+ * The request object that will be sent.
719
+ * @param {string} request.name
720
+ * Resource name for the location.
721
+ * @param {object} [options]
722
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
723
+ * @returns {Promise} - The promise which resolves to an array.
724
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
725
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
726
+ * for more details and examples.
727
+ * @example
728
+ * ```
729
+ * const [response] = await client.getLocation(request);
730
+ * ```
731
+ */
885
732
  getLocation(request, options, callback) {
886
733
  return this.locationsClient.getLocation(request, options, callback);
887
734
  }
888
735
  /**
889
- * Lists information about the supported locations for this service. Returns an iterable object.
890
- *
891
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
892
- * @param {Object} request
893
- * The request object that will be sent.
894
- * @param {string} request.name
895
- * The resource that owns the locations collection, if applicable.
896
- * @param {string} request.filter
897
- * The standard list filter.
898
- * @param {number} request.pageSize
899
- * The standard list page size.
900
- * @param {string} request.pageToken
901
- * The standard list page token.
902
- * @param {object} [options]
903
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
904
- * @returns {Object}
905
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
906
- * When you iterate the returned iterable, each element will be an object representing
907
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
908
- * so you can stop the iteration when you don't need more results.
909
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
910
- * for more details and examples.
911
- * @example
912
- * ```
913
- * const iterable = client.listLocationsAsync(request);
914
- * for await (const response of iterable) {
915
- * // process response
916
- * }
917
- * ```
918
- */
736
+ * Lists information about the supported locations for this service. Returns an iterable object.
737
+ *
738
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
739
+ * @param {Object} request
740
+ * The request object that will be sent.
741
+ * @param {string} request.name
742
+ * The resource that owns the locations collection, if applicable.
743
+ * @param {string} request.filter
744
+ * The standard list filter.
745
+ * @param {number} request.pageSize
746
+ * The standard list page size.
747
+ * @param {string} request.pageToken
748
+ * The standard list page token.
749
+ * @param {object} [options]
750
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
751
+ * @returns {Object}
752
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
753
+ * When you iterate the returned iterable, each element will be an object representing
754
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
755
+ * so you can stop the iteration when you don't need more results.
756
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
757
+ * for more details and examples.
758
+ * @example
759
+ * ```
760
+ * const iterable = client.listLocationsAsync(request);
761
+ * for await (const response of iterable) {
762
+ * // process response
763
+ * }
764
+ * ```
765
+ */
919
766
  listLocationsAsync(request, options) {
920
767
  return this.locationsClient.listLocationsAsync(request, options);
921
768
  }
922
769
  /**
923
- * Gets the latest state of a long-running operation. Clients can use this
924
- * method to poll the operation result at intervals as recommended by the API
925
- * service.
926
- *
927
- * @param {Object} request - The request object that will be sent.
928
- * @param {string} request.name - The name of the operation resource.
929
- * @param {Object=} options
930
- * Optional parameters. You can override the default settings for this call,
931
- * e.g, timeout, retries, paginations, etc. See {@link
932
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
933
- * for the details.
934
- * @param {function(?Error, ?Object)=} callback
935
- * The function which will be called with the result of the API call.
936
- *
937
- * The second parameter to the callback is an object representing
938
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
939
- * @return {Promise} - The promise which resolves to an array.
940
- * The first element of the array is an object representing
941
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
942
- * The promise has a method named "cancel" which cancels the ongoing API call.
943
- *
944
- * @example
945
- * ```
946
- * const client = longrunning.operationsClient();
947
- * const name = '';
948
- * const [response] = await client.getOperation({name});
949
- * // doThingsWith(response)
950
- * ```
951
- */
770
+ * Gets the latest state of a long-running operation. Clients can use this
771
+ * method to poll the operation result at intervals as recommended by the API
772
+ * service.
773
+ *
774
+ * @param {Object} request - The request object that will be sent.
775
+ * @param {string} request.name - The name of the operation resource.
776
+ * @param {Object=} options
777
+ * Optional parameters. You can override the default settings for this call,
778
+ * e.g, timeout, retries, paginations, etc. See {@link
779
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
780
+ * for the details.
781
+ * @param {function(?Error, ?Object)=} callback
782
+ * The function which will be called with the result of the API call.
783
+ *
784
+ * The second parameter to the callback is an object representing
785
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
786
+ * @return {Promise} - The promise which resolves to an array.
787
+ * The first element of the array is an object representing
788
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
789
+ * The promise has a method named "cancel" which cancels the ongoing API call.
790
+ *
791
+ * @example
792
+ * ```
793
+ * const client = longrunning.operationsClient();
794
+ * const name = '';
795
+ * const [response] = await client.getOperation({name});
796
+ * // doThingsWith(response)
797
+ * ```
798
+ */
952
799
  getOperation(request, optionsOrCallback, callback) {
953
800
  let options;
954
801
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1123,8 +970,7 @@ class DataStoreServiceClient {
1123
970
  * @returns {string} A string representing the project.
1124
971
  */
1125
972
  matchProjectFromAclConfigName(aclConfigName) {
1126
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1127
- .project;
973
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
1128
974
  }
1129
975
  /**
1130
976
  * Parse the location from AclConfig resource.
@@ -1134,8 +980,7 @@ class DataStoreServiceClient {
1134
980
  * @returns {string} A string representing the location.
1135
981
  */
1136
982
  matchLocationFromAclConfigName(aclConfigName) {
1137
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1138
- .location;
983
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
1139
984
  }
1140
985
  /**
1141
986
  * Return a fully-qualified collection resource name string.
@@ -1160,8 +1005,7 @@ class DataStoreServiceClient {
1160
1005
  * @returns {string} A string representing the project.
1161
1006
  */
1162
1007
  matchProjectFromCollectionName(collectionName) {
1163
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1164
- .project;
1008
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).project;
1165
1009
  }
1166
1010
  /**
1167
1011
  * Parse the location from Collection resource.
@@ -1171,8 +1015,7 @@ class DataStoreServiceClient {
1171
1015
  * @returns {string} A string representing the location.
1172
1016
  */
1173
1017
  matchLocationFromCollectionName(collectionName) {
1174
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1175
- .location;
1018
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).location;
1176
1019
  }
1177
1020
  /**
1178
1021
  * Parse the collection from Collection resource.
@@ -1182,8 +1025,7 @@ class DataStoreServiceClient {
1182
1025
  * @returns {string} A string representing the collection.
1183
1026
  */
1184
1027
  matchCollectionFromCollectionName(collectionName) {
1185
- return this.pathTemplates.collectionPathTemplate.match(collectionName)
1186
- .collection;
1028
+ return this.pathTemplates.collectionPathTemplate.match(collectionName).collection;
1187
1029
  }
1188
1030
  /**
1189
1031
  * Return a fully-qualified engine resource name string.
@@ -1265,8 +1107,7 @@ class DataStoreServiceClient {
1265
1107
  * @returns {string} A string representing the project.
1266
1108
  */
1267
1109
  matchProjectFromEvaluationName(evaluationName) {
1268
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1269
- .project;
1110
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1270
1111
  }
1271
1112
  /**
1272
1113
  * Parse the location from Evaluation resource.
@@ -1276,8 +1117,7 @@ class DataStoreServiceClient {
1276
1117
  * @returns {string} A string representing the location.
1277
1118
  */
1278
1119
  matchLocationFromEvaluationName(evaluationName) {
1279
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1280
- .location;
1120
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1281
1121
  }
1282
1122
  /**
1283
1123
  * Parse the evaluation from Evaluation resource.
@@ -1287,8 +1127,7 @@ class DataStoreServiceClient {
1287
1127
  * @returns {string} A string representing the evaluation.
1288
1128
  */
1289
1129
  matchEvaluationFromEvaluationName(evaluationName) {
1290
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1291
- .evaluation;
1130
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1292
1131
  }
1293
1132
  /**
1294
1133
  * Return a fully-qualified project resource name string.
@@ -3355,8 +3194,7 @@ class DataStoreServiceClient {
3355
3194
  * @returns {string} A string representing the project.
3356
3195
  */
3357
3196
  matchProjectFromSampleQueryName(sampleQueryName) {
3358
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3359
- .project;
3197
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3360
3198
  }
3361
3199
  /**
3362
3200
  * Parse the location from SampleQuery resource.
@@ -3366,8 +3204,7 @@ class DataStoreServiceClient {
3366
3204
  * @returns {string} A string representing the location.
3367
3205
  */
3368
3206
  matchLocationFromSampleQueryName(sampleQueryName) {
3369
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3370
- .location;
3207
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3371
3208
  }
3372
3209
  /**
3373
3210
  * Parse the sample_query_set from SampleQuery resource.
@@ -3377,8 +3214,7 @@ class DataStoreServiceClient {
3377
3214
  * @returns {string} A string representing the sample_query_set.
3378
3215
  */
3379
3216
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3380
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3381
- .sample_query_set;
3217
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3382
3218
  }
3383
3219
  /**
3384
3220
  * Parse the sample_query from SampleQuery resource.
@@ -3388,8 +3224,7 @@ class DataStoreServiceClient {
3388
3224
  * @returns {string} A string representing the sample_query.
3389
3225
  */
3390
3226
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3391
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3392
- .sample_query;
3227
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3393
3228
  }
3394
3229
  /**
3395
3230
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3448,8 +3283,8 @@ class DataStoreServiceClient {
3448
3283
  this._log.info('ending gRPC channel');
3449
3284
  this._terminated = true;
3450
3285
  stub.close();
3451
- this.locationsClient.close();
3452
- this.operationsClient.close();
3286
+ this.locationsClient.close().catch(err => { throw err; });
3287
+ void this.operationsClient.close();
3453
3288
  });
3454
3289
  }
3455
3290
  return Promise.resolve();