@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 EvaluationServiceClient {
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 EvaluationServiceClient {
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
  }
@@ -214,133 +208,28 @@ class EvaluationServiceClient {
214
208
  // pages). Denote the keys used for pagination and results.
215
209
  this.descriptors.page = {
216
210
  listEvaluations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'evaluations'),
217
- listEvaluationResults: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'evaluationResults'),
211
+ listEvaluationResults: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'evaluationResults')
218
212
  };
219
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
213
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
220
214
  // This API contains "long-running operations", which return a
221
215
  // an Operation object that allows for tracking of the operation,
222
216
  // rather than holding a request open.
223
217
  const lroOptions = {
224
218
  auth: this.auth,
225
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
219
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
226
220
  };
227
221
  if (opts.fallback) {
228
222
  lroOptions.protoJson = protoFilesRoot;
229
- lroOptions.httpRules = [
230
- {
231
- selector: 'google.longrunning.Operations.CancelOperation',
232
- post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
233
- body: '*',
234
- additional_bindings: [
235
- {
236
- post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
237
- body: '*',
238
- },
239
- ],
240
- },
241
- {
242
- selector: 'google.longrunning.Operations.GetOperation',
243
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
244
- additional_bindings: [
245
- {
246
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
247
- },
248
- {
249
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
250
- },
251
- {
252
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
253
- },
254
- {
255
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
256
- },
257
- {
258
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
259
- },
260
- {
261
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
262
- },
263
- {
264
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
265
- },
266
- {
267
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
268
- },
269
- {
270
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
271
- },
272
- {
273
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
274
- },
275
- {
276
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
277
- },
278
- {
279
- get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
280
- },
281
- {
282
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
283
- },
284
- { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
285
- {
286
- get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
287
- },
288
- { get: '/v1alpha/{name=projects/*/operations/*}' },
289
- ],
290
- },
291
- {
292
- selector: 'google.longrunning.Operations.ListOperations',
293
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
294
- additional_bindings: [
295
- {
296
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
297
- },
298
- {
299
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
300
- },
301
- {
302
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
303
- },
304
- {
305
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
306
- },
307
- {
308
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
309
- },
310
- {
311
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
312
- },
313
- {
314
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
315
- },
316
- {
317
- get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
318
- },
319
- {
320
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
321
- },
322
- {
323
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
324
- },
325
- {
326
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
327
- },
328
- {
329
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
330
- },
331
- { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
332
- { get: '/v1alpha/{name=projects/*}/operations' },
333
- ],
334
- },
335
- ];
223
+ 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: '*', }],
224
+ }, { 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/*}', }],
225
+ }, { 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', }],
226
+ }];
336
227
  }
337
- this.operationsClient = this._gaxModule
338
- .lro(lroOptions)
339
- .operationsClient(opts);
228
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
340
229
  const createEvaluationResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.Evaluation');
341
230
  const createEvaluationMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateEvaluationMetadata');
342
231
  this.descriptors.longrunning = {
343
- createEvaluation: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createEvaluationResponse.decode.bind(createEvaluationResponse), createEvaluationMetadata.decode.bind(createEvaluationMetadata)),
232
+ createEvaluation: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createEvaluationResponse.decode.bind(createEvaluationResponse), createEvaluationMetadata.decode.bind(createEvaluationMetadata))
344
233
  };
345
234
  // Put together the default options sent with requests.
346
235
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.EvaluationService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -369,19 +258,13 @@ class EvaluationServiceClient {
369
258
  }
370
259
  // Put together the "service stub" for
371
260
  // google.cloud.discoveryengine.v1alpha.EvaluationService.
372
- this.evaluationServiceStub = this._gaxGrpc.createStub(this._opts.fallback
373
- ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.EvaluationService')
374
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
375
- this._protos.google.cloud.discoveryengine.v1alpha
376
- .EvaluationService, this._opts, this._providedCustomServicePath);
261
+ this.evaluationServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
262
+ this._protos.lookupService('google.cloud.discoveryengine.v1alpha.EvaluationService') :
263
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
264
+ this._protos.google.cloud.discoveryengine.v1alpha.EvaluationService, this._opts, this._providedCustomServicePath);
377
265
  // Iterate over each of the methods that the service provides
378
266
  // and create an API call method for each.
379
- const evaluationServiceStubMethods = [
380
- 'getEvaluation',
381
- 'listEvaluations',
382
- 'createEvaluation',
383
- 'listEvaluationResults',
384
- ];
267
+ const evaluationServiceStubMethods = ['getEvaluation', 'listEvaluations', 'createEvaluation', 'listEvaluationResults'];
385
268
  for (const methodName of evaluationServiceStubMethods) {
386
269
  const callPromise = this.evaluationServiceStub.then(stub => (...args) => {
387
270
  if (this._terminated) {
@@ -406,8 +289,7 @@ class EvaluationServiceClient {
406
289
  * @returns {string} The DNS address for this service.
407
290
  */
408
291
  static get servicePath() {
409
- if (typeof process === 'object' &&
410
- typeof process.emitWarning === 'function') {
292
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
411
293
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
412
294
  }
413
295
  return 'discoveryengine.googleapis.com';
@@ -418,8 +300,7 @@ class EvaluationServiceClient {
418
300
  * @returns {string} The DNS address for this service.
419
301
  */
420
302
  static get apiEndpoint() {
421
- if (typeof process === 'object' &&
422
- typeof process.emitWarning === 'function') {
303
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
423
304
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
424
305
  }
425
306
  return 'discoveryengine.googleapis.com';
@@ -447,7 +328,9 @@ class EvaluationServiceClient {
447
328
  * @returns {string[]} List of default scopes.
448
329
  */
449
330
  static get scopes() {
450
- return ['https://www.googleapis.com/auth/cloud-platform'];
331
+ return [
332
+ 'https://www.googleapis.com/auth/cloud-platform'
333
+ ];
451
334
  }
452
335
  /**
453
336
  * Return the project ID used by this class.
@@ -473,13 +356,10 @@ class EvaluationServiceClient {
473
356
  options = options || {};
474
357
  options.otherArgs = options.otherArgs || {};
475
358
  options.otherArgs.headers = options.otherArgs.headers || {};
476
- options.otherArgs.headers['x-goog-request-params'] =
477
- this._gaxModule.routingHeader.fromParams({
478
- name: request.name ?? '',
479
- });
480
- this.initialize().catch(err => {
481
- throw err;
359
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
360
+ 'name': request.name ?? '',
482
361
  });
362
+ this.initialize().catch(err => { throw err; });
483
363
  this._log.info('getEvaluation request %j', request);
484
364
  const wrappedCallback = callback
485
365
  ? (error, response, options, rawResponse) => {
@@ -487,11 +367,16 @@ class EvaluationServiceClient {
487
367
  callback(error, response, options, rawResponse); // We verified callback above.
488
368
  }
489
369
  : undefined;
490
- return this.innerApiCalls
491
- .getEvaluation(request, options, wrappedCallback)
370
+ return this.innerApiCalls.getEvaluation(request, options, wrappedCallback)
492
371
  ?.then(([response, options, rawResponse]) => {
493
372
  this._log.info('getEvaluation response %j', response);
494
373
  return [response, options, rawResponse];
374
+ }).catch((error) => {
375
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
376
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
377
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
378
+ }
379
+ throw error;
495
380
  });
496
381
  }
497
382
  createEvaluation(request, optionsOrCallback, callback) {
@@ -507,13 +392,10 @@ class EvaluationServiceClient {
507
392
  options = options || {};
508
393
  options.otherArgs = options.otherArgs || {};
509
394
  options.otherArgs.headers = options.otherArgs.headers || {};
510
- options.otherArgs.headers['x-goog-request-params'] =
511
- this._gaxModule.routingHeader.fromParams({
512
- parent: request.parent ?? '',
513
- });
514
- this.initialize().catch(err => {
515
- throw err;
395
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
396
+ 'parent': request.parent ?? '',
516
397
  });
398
+ this.initialize().catch(err => { throw err; });
517
399
  const wrappedCallback = callback
518
400
  ? (error, response, rawResponse, _) => {
519
401
  this._log.info('createEvaluation response %j', rawResponse);
@@ -521,8 +403,7 @@ class EvaluationServiceClient {
521
403
  }
522
404
  : undefined;
523
405
  this._log.info('createEvaluation request %j', request);
524
- return this.innerApiCalls
525
- .createEvaluation(request, options, wrappedCallback)
406
+ return this.innerApiCalls.createEvaluation(request, options, wrappedCallback)
526
407
  ?.then(([response, rawResponse, _]) => {
527
408
  this._log.info('createEvaluation response %j', rawResponse);
528
409
  return [response, rawResponse, _];
@@ -559,13 +440,10 @@ class EvaluationServiceClient {
559
440
  options = options || {};
560
441
  options.otherArgs = options.otherArgs || {};
561
442
  options.otherArgs.headers = options.otherArgs.headers || {};
562
- options.otherArgs.headers['x-goog-request-params'] =
563
- this._gaxModule.routingHeader.fromParams({
564
- parent: request.parent ?? '',
565
- });
566
- this.initialize().catch(err => {
567
- throw err;
443
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
444
+ 'parent': request.parent ?? '',
568
445
  });
446
+ this.initialize().catch(err => { throw err; });
569
447
  const wrappedCallback = callback
570
448
  ? (error, values, nextPageRequest, rawResponse) => {
571
449
  this._log.info('listEvaluations values %j', values);
@@ -626,15 +504,12 @@ class EvaluationServiceClient {
626
504
  options = options || {};
627
505
  options.otherArgs = options.otherArgs || {};
628
506
  options.otherArgs.headers = options.otherArgs.headers || {};
629
- options.otherArgs.headers['x-goog-request-params'] =
630
- this._gaxModule.routingHeader.fromParams({
631
- parent: request.parent ?? '',
632
- });
507
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
508
+ 'parent': request.parent ?? '',
509
+ });
633
510
  const defaultCallSettings = this._defaults['listEvaluations'];
634
511
  const callSettings = defaultCallSettings.merge(options);
635
- this.initialize().catch(err => {
636
- throw err;
637
- });
512
+ this.initialize().catch(err => { throw err; });
638
513
  this._log.info('listEvaluations stream %j', request);
639
514
  return this.descriptors.page.listEvaluations.createStream(this.innerApiCalls.listEvaluations, request, callSettings);
640
515
  }
@@ -687,15 +562,12 @@ class EvaluationServiceClient {
687
562
  options = options || {};
688
563
  options.otherArgs = options.otherArgs || {};
689
564
  options.otherArgs.headers = options.otherArgs.headers || {};
690
- options.otherArgs.headers['x-goog-request-params'] =
691
- this._gaxModule.routingHeader.fromParams({
692
- parent: request.parent ?? '',
693
- });
565
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
566
+ 'parent': request.parent ?? '',
567
+ });
694
568
  const defaultCallSettings = this._defaults['listEvaluations'];
695
569
  const callSettings = defaultCallSettings.merge(options);
696
- this.initialize().catch(err => {
697
- throw err;
698
- });
570
+ this.initialize().catch(err => { throw err; });
699
571
  this._log.info('listEvaluations iterate %j', request);
700
572
  return this.descriptors.page.listEvaluations.asyncIterate(this.innerApiCalls['listEvaluations'], request, callSettings);
701
573
  }
@@ -712,13 +584,10 @@ class EvaluationServiceClient {
712
584
  options = options || {};
713
585
  options.otherArgs = options.otherArgs || {};
714
586
  options.otherArgs.headers = options.otherArgs.headers || {};
715
- options.otherArgs.headers['x-goog-request-params'] =
716
- this._gaxModule.routingHeader.fromParams({
717
- evaluation: request.evaluation ?? '',
718
- });
719
- this.initialize().catch(err => {
720
- throw err;
587
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
588
+ 'evaluation': request.evaluation ?? '',
721
589
  });
590
+ this.initialize().catch(err => { throw err; });
722
591
  const wrappedCallback = callback
723
592
  ? (error, values, nextPageRequest, rawResponse) => {
724
593
  this._log.info('listEvaluationResults values %j', values);
@@ -777,15 +646,12 @@ class EvaluationServiceClient {
777
646
  options = options || {};
778
647
  options.otherArgs = options.otherArgs || {};
779
648
  options.otherArgs.headers = options.otherArgs.headers || {};
780
- options.otherArgs.headers['x-goog-request-params'] =
781
- this._gaxModule.routingHeader.fromParams({
782
- evaluation: request.evaluation ?? '',
783
- });
649
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
650
+ 'evaluation': request.evaluation ?? '',
651
+ });
784
652
  const defaultCallSettings = this._defaults['listEvaluationResults'];
785
653
  const callSettings = defaultCallSettings.merge(options);
786
- this.initialize().catch(err => {
787
- throw err;
788
- });
654
+ this.initialize().catch(err => { throw err; });
789
655
  this._log.info('listEvaluationResults stream %j', request);
790
656
  return this.descriptors.page.listEvaluationResults.createStream(this.innerApiCalls.listEvaluationResults, request, callSettings);
791
657
  }
@@ -836,103 +702,100 @@ class EvaluationServiceClient {
836
702
  options = options || {};
837
703
  options.otherArgs = options.otherArgs || {};
838
704
  options.otherArgs.headers = options.otherArgs.headers || {};
839
- options.otherArgs.headers['x-goog-request-params'] =
840
- this._gaxModule.routingHeader.fromParams({
841
- evaluation: request.evaluation ?? '',
842
- });
705
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
706
+ 'evaluation': request.evaluation ?? '',
707
+ });
843
708
  const defaultCallSettings = this._defaults['listEvaluationResults'];
844
709
  const callSettings = defaultCallSettings.merge(options);
845
- this.initialize().catch(err => {
846
- throw err;
847
- });
710
+ this.initialize().catch(err => { throw err; });
848
711
  this._log.info('listEvaluationResults iterate %j', request);
849
712
  return this.descriptors.page.listEvaluationResults.asyncIterate(this.innerApiCalls['listEvaluationResults'], request, callSettings);
850
713
  }
851
714
  /**
852
- * Gets information about a location.
853
- *
854
- * @param {Object} request
855
- * The request object that will be sent.
856
- * @param {string} request.name
857
- * Resource name for the location.
858
- * @param {object} [options]
859
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
860
- * @returns {Promise} - The promise which resolves to an array.
861
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
862
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
863
- * for more details and examples.
864
- * @example
865
- * ```
866
- * const [response] = await client.getLocation(request);
867
- * ```
868
- */
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
+ */
869
732
  getLocation(request, options, callback) {
870
733
  return this.locationsClient.getLocation(request, options, callback);
871
734
  }
872
735
  /**
873
- * Lists information about the supported locations for this service. Returns an iterable object.
874
- *
875
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
876
- * @param {Object} request
877
- * The request object that will be sent.
878
- * @param {string} request.name
879
- * The resource that owns the locations collection, if applicable.
880
- * @param {string} request.filter
881
- * The standard list filter.
882
- * @param {number} request.pageSize
883
- * The standard list page size.
884
- * @param {string} request.pageToken
885
- * The standard list page token.
886
- * @param {object} [options]
887
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
888
- * @returns {Object}
889
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
890
- * When you iterate the returned iterable, each element will be an object representing
891
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
892
- * so you can stop the iteration when you don't need more results.
893
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
894
- * for more details and examples.
895
- * @example
896
- * ```
897
- * const iterable = client.listLocationsAsync(request);
898
- * for await (const response of iterable) {
899
- * // process response
900
- * }
901
- * ```
902
- */
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
+ */
903
766
  listLocationsAsync(request, options) {
904
767
  return this.locationsClient.listLocationsAsync(request, options);
905
768
  }
906
769
  /**
907
- * Gets the latest state of a long-running operation. Clients can use this
908
- * method to poll the operation result at intervals as recommended by the API
909
- * service.
910
- *
911
- * @param {Object} request - The request object that will be sent.
912
- * @param {string} request.name - The name of the operation resource.
913
- * @param {Object=} options
914
- * Optional parameters. You can override the default settings for this call,
915
- * e.g, timeout, retries, paginations, etc. See {@link
916
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
917
- * for the details.
918
- * @param {function(?Error, ?Object)=} callback
919
- * The function which will be called with the result of the API call.
920
- *
921
- * The second parameter to the callback is an object representing
922
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
923
- * @return {Promise} - The promise which resolves to an array.
924
- * The first element of the array is an object representing
925
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
926
- * The promise has a method named "cancel" which cancels the ongoing API call.
927
- *
928
- * @example
929
- * ```
930
- * const client = longrunning.operationsClient();
931
- * const name = '';
932
- * const [response] = await client.getOperation({name});
933
- * // doThingsWith(response)
934
- * ```
935
- */
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
+ */
936
799
  getOperation(request, optionsOrCallback, callback) {
937
800
  let options;
938
801
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1107,8 +970,7 @@ class EvaluationServiceClient {
1107
970
  * @returns {string} A string representing the project.
1108
971
  */
1109
972
  matchProjectFromAclConfigName(aclConfigName) {
1110
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1111
- .project;
973
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
1112
974
  }
1113
975
  /**
1114
976
  * Parse the location from AclConfig resource.
@@ -1118,8 +980,7 @@ class EvaluationServiceClient {
1118
980
  * @returns {string} A string representing the location.
1119
981
  */
1120
982
  matchLocationFromAclConfigName(aclConfigName) {
1121
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1122
- .location;
983
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
1123
984
  }
1124
985
  /**
1125
986
  * Return a fully-qualified engine resource name string.
@@ -1201,8 +1062,7 @@ class EvaluationServiceClient {
1201
1062
  * @returns {string} A string representing the project.
1202
1063
  */
1203
1064
  matchProjectFromEvaluationName(evaluationName) {
1204
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1205
- .project;
1065
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1206
1066
  }
1207
1067
  /**
1208
1068
  * Parse the location from Evaluation resource.
@@ -1212,8 +1072,7 @@ class EvaluationServiceClient {
1212
1072
  * @returns {string} A string representing the location.
1213
1073
  */
1214
1074
  matchLocationFromEvaluationName(evaluationName) {
1215
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1216
- .location;
1075
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1217
1076
  }
1218
1077
  /**
1219
1078
  * Parse the evaluation from Evaluation resource.
@@ -1223,8 +1082,7 @@ class EvaluationServiceClient {
1223
1082
  * @returns {string} A string representing the evaluation.
1224
1083
  */
1225
1084
  matchEvaluationFromEvaluationName(evaluationName) {
1226
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1227
- .evaluation;
1085
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1228
1086
  }
1229
1087
  /**
1230
1088
  * Return a fully-qualified location resource name string.
@@ -3324,8 +3182,7 @@ class EvaluationServiceClient {
3324
3182
  * @returns {string} A string representing the project.
3325
3183
  */
3326
3184
  matchProjectFromSampleQueryName(sampleQueryName) {
3327
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3328
- .project;
3185
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3329
3186
  }
3330
3187
  /**
3331
3188
  * Parse the location from SampleQuery resource.
@@ -3335,8 +3192,7 @@ class EvaluationServiceClient {
3335
3192
  * @returns {string} A string representing the location.
3336
3193
  */
3337
3194
  matchLocationFromSampleQueryName(sampleQueryName) {
3338
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3339
- .location;
3195
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3340
3196
  }
3341
3197
  /**
3342
3198
  * Parse the sample_query_set from SampleQuery resource.
@@ -3346,8 +3202,7 @@ class EvaluationServiceClient {
3346
3202
  * @returns {string} A string representing the sample_query_set.
3347
3203
  */
3348
3204
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3349
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3350
- .sample_query_set;
3205
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3351
3206
  }
3352
3207
  /**
3353
3208
  * Parse the sample_query from SampleQuery resource.
@@ -3357,8 +3212,7 @@ class EvaluationServiceClient {
3357
3212
  * @returns {string} A string representing the sample_query.
3358
3213
  */
3359
3214
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3360
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3361
- .sample_query;
3215
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3362
3216
  }
3363
3217
  /**
3364
3218
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3417,8 +3271,8 @@ class EvaluationServiceClient {
3417
3271
  this._log.info('ending gRPC channel');
3418
3272
  this._terminated = true;
3419
3273
  stub.close();
3420
- this.locationsClient.close();
3421
- this.operationsClient.close();
3274
+ this.locationsClient.close().catch(err => { throw err; });
3275
+ void this.operationsClient.close();
3422
3276
  });
3423
3277
  }
3424
3278
  return Promise.resolve();