@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 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,7 +208,7 @@ 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
213
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
220
214
  // This API contains "long-running operations", which return a
@@ -222,125 +216,20 @@ class EvaluationServiceClient {
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,8 +367,7 @@ 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];
@@ -507,13 +386,10 @@ class EvaluationServiceClient {
507
386
  options = options || {};
508
387
  options.otherArgs = options.otherArgs || {};
509
388
  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;
389
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
390
+ 'parent': request.parent ?? '',
516
391
  });
392
+ this.initialize().catch(err => { throw err; });
517
393
  const wrappedCallback = callback
518
394
  ? (error, response, rawResponse, _) => {
519
395
  this._log.info('createEvaluation response %j', rawResponse);
@@ -521,8 +397,7 @@ class EvaluationServiceClient {
521
397
  }
522
398
  : undefined;
523
399
  this._log.info('createEvaluation request %j', request);
524
- return this.innerApiCalls
525
- .createEvaluation(request, options, wrappedCallback)
400
+ return this.innerApiCalls.createEvaluation(request, options, wrappedCallback)
526
401
  ?.then(([response, rawResponse, _]) => {
527
402
  this._log.info('createEvaluation response %j', rawResponse);
528
403
  return [response, rawResponse, _];
@@ -559,13 +434,10 @@ class EvaluationServiceClient {
559
434
  options = options || {};
560
435
  options.otherArgs = options.otherArgs || {};
561
436
  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;
437
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
438
+ 'parent': request.parent ?? '',
568
439
  });
440
+ this.initialize().catch(err => { throw err; });
569
441
  const wrappedCallback = callback
570
442
  ? (error, values, nextPageRequest, rawResponse) => {
571
443
  this._log.info('listEvaluations values %j', values);
@@ -626,15 +498,12 @@ class EvaluationServiceClient {
626
498
  options = options || {};
627
499
  options.otherArgs = options.otherArgs || {};
628
500
  options.otherArgs.headers = options.otherArgs.headers || {};
629
- options.otherArgs.headers['x-goog-request-params'] =
630
- this._gaxModule.routingHeader.fromParams({
631
- parent: request.parent ?? '',
632
- });
501
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
502
+ 'parent': request.parent ?? '',
503
+ });
633
504
  const defaultCallSettings = this._defaults['listEvaluations'];
634
505
  const callSettings = defaultCallSettings.merge(options);
635
- this.initialize().catch(err => {
636
- throw err;
637
- });
506
+ this.initialize().catch(err => { throw err; });
638
507
  this._log.info('listEvaluations stream %j', request);
639
508
  return this.descriptors.page.listEvaluations.createStream(this.innerApiCalls.listEvaluations, request, callSettings);
640
509
  }
@@ -687,15 +556,12 @@ class EvaluationServiceClient {
687
556
  options = options || {};
688
557
  options.otherArgs = options.otherArgs || {};
689
558
  options.otherArgs.headers = options.otherArgs.headers || {};
690
- options.otherArgs.headers['x-goog-request-params'] =
691
- this._gaxModule.routingHeader.fromParams({
692
- parent: request.parent ?? '',
693
- });
559
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
560
+ 'parent': request.parent ?? '',
561
+ });
694
562
  const defaultCallSettings = this._defaults['listEvaluations'];
695
563
  const callSettings = defaultCallSettings.merge(options);
696
- this.initialize().catch(err => {
697
- throw err;
698
- });
564
+ this.initialize().catch(err => { throw err; });
699
565
  this._log.info('listEvaluations iterate %j', request);
700
566
  return this.descriptors.page.listEvaluations.asyncIterate(this.innerApiCalls['listEvaluations'], request, callSettings);
701
567
  }
@@ -712,13 +578,10 @@ class EvaluationServiceClient {
712
578
  options = options || {};
713
579
  options.otherArgs = options.otherArgs || {};
714
580
  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;
581
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
582
+ 'evaluation': request.evaluation ?? '',
721
583
  });
584
+ this.initialize().catch(err => { throw err; });
722
585
  const wrappedCallback = callback
723
586
  ? (error, values, nextPageRequest, rawResponse) => {
724
587
  this._log.info('listEvaluationResults values %j', values);
@@ -777,15 +640,12 @@ class EvaluationServiceClient {
777
640
  options = options || {};
778
641
  options.otherArgs = options.otherArgs || {};
779
642
  options.otherArgs.headers = options.otherArgs.headers || {};
780
- options.otherArgs.headers['x-goog-request-params'] =
781
- this._gaxModule.routingHeader.fromParams({
782
- evaluation: request.evaluation ?? '',
783
- });
643
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
644
+ 'evaluation': request.evaluation ?? '',
645
+ });
784
646
  const defaultCallSettings = this._defaults['listEvaluationResults'];
785
647
  const callSettings = defaultCallSettings.merge(options);
786
- this.initialize().catch(err => {
787
- throw err;
788
- });
648
+ this.initialize().catch(err => { throw err; });
789
649
  this._log.info('listEvaluationResults stream %j', request);
790
650
  return this.descriptors.page.listEvaluationResults.createStream(this.innerApiCalls.listEvaluationResults, request, callSettings);
791
651
  }
@@ -836,103 +696,100 @@ class EvaluationServiceClient {
836
696
  options = options || {};
837
697
  options.otherArgs = options.otherArgs || {};
838
698
  options.otherArgs.headers = options.otherArgs.headers || {};
839
- options.otherArgs.headers['x-goog-request-params'] =
840
- this._gaxModule.routingHeader.fromParams({
841
- evaluation: request.evaluation ?? '',
842
- });
699
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
700
+ 'evaluation': request.evaluation ?? '',
701
+ });
843
702
  const defaultCallSettings = this._defaults['listEvaluationResults'];
844
703
  const callSettings = defaultCallSettings.merge(options);
845
- this.initialize().catch(err => {
846
- throw err;
847
- });
704
+ this.initialize().catch(err => { throw err; });
848
705
  this._log.info('listEvaluationResults iterate %j', request);
849
706
  return this.descriptors.page.listEvaluationResults.asyncIterate(this.innerApiCalls['listEvaluationResults'], request, callSettings);
850
707
  }
851
708
  /**
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
- */
709
+ * Gets information about a location.
710
+ *
711
+ * @param {Object} request
712
+ * The request object that will be sent.
713
+ * @param {string} request.name
714
+ * Resource name for the location.
715
+ * @param {object} [options]
716
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
717
+ * @returns {Promise} - The promise which resolves to an array.
718
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
719
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
720
+ * for more details and examples.
721
+ * @example
722
+ * ```
723
+ * const [response] = await client.getLocation(request);
724
+ * ```
725
+ */
869
726
  getLocation(request, options, callback) {
870
727
  return this.locationsClient.getLocation(request, options, callback);
871
728
  }
872
729
  /**
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
- */
730
+ * Lists information about the supported locations for this service. Returns an iterable object.
731
+ *
732
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
733
+ * @param {Object} request
734
+ * The request object that will be sent.
735
+ * @param {string} request.name
736
+ * The resource that owns the locations collection, if applicable.
737
+ * @param {string} request.filter
738
+ * The standard list filter.
739
+ * @param {number} request.pageSize
740
+ * The standard list page size.
741
+ * @param {string} request.pageToken
742
+ * The standard list page token.
743
+ * @param {object} [options]
744
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
745
+ * @returns {Object}
746
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
747
+ * When you iterate the returned iterable, each element will be an object representing
748
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
749
+ * so you can stop the iteration when you don't need more results.
750
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
751
+ * for more details and examples.
752
+ * @example
753
+ * ```
754
+ * const iterable = client.listLocationsAsync(request);
755
+ * for await (const response of iterable) {
756
+ * // process response
757
+ * }
758
+ * ```
759
+ */
903
760
  listLocationsAsync(request, options) {
904
761
  return this.locationsClient.listLocationsAsync(request, options);
905
762
  }
906
763
  /**
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
- */
764
+ * Gets the latest state of a long-running operation. Clients can use this
765
+ * method to poll the operation result at intervals as recommended by the API
766
+ * service.
767
+ *
768
+ * @param {Object} request - The request object that will be sent.
769
+ * @param {string} request.name - The name of the operation resource.
770
+ * @param {Object=} options
771
+ * Optional parameters. You can override the default settings for this call,
772
+ * e.g, timeout, retries, paginations, etc. See {@link
773
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
774
+ * for the details.
775
+ * @param {function(?Error, ?Object)=} callback
776
+ * The function which will be called with the result of the API call.
777
+ *
778
+ * The second parameter to the callback is an object representing
779
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
780
+ * @return {Promise} - The promise which resolves to an array.
781
+ * The first element of the array is an object representing
782
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
783
+ * The promise has a method named "cancel" which cancels the ongoing API call.
784
+ *
785
+ * @example
786
+ * ```
787
+ * const client = longrunning.operationsClient();
788
+ * const name = '';
789
+ * const [response] = await client.getOperation({name});
790
+ * // doThingsWith(response)
791
+ * ```
792
+ */
936
793
  getOperation(request, optionsOrCallback, callback) {
937
794
  let options;
938
795
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1107,8 +964,7 @@ class EvaluationServiceClient {
1107
964
  * @returns {string} A string representing the project.
1108
965
  */
1109
966
  matchProjectFromAclConfigName(aclConfigName) {
1110
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1111
- .project;
967
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
1112
968
  }
1113
969
  /**
1114
970
  * Parse the location from AclConfig resource.
@@ -1118,8 +974,7 @@ class EvaluationServiceClient {
1118
974
  * @returns {string} A string representing the location.
1119
975
  */
1120
976
  matchLocationFromAclConfigName(aclConfigName) {
1121
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1122
- .location;
977
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
1123
978
  }
1124
979
  /**
1125
980
  * Return a fully-qualified engine resource name string.
@@ -1201,8 +1056,7 @@ class EvaluationServiceClient {
1201
1056
  * @returns {string} A string representing the project.
1202
1057
  */
1203
1058
  matchProjectFromEvaluationName(evaluationName) {
1204
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1205
- .project;
1059
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1206
1060
  }
1207
1061
  /**
1208
1062
  * Parse the location from Evaluation resource.
@@ -1212,8 +1066,7 @@ class EvaluationServiceClient {
1212
1066
  * @returns {string} A string representing the location.
1213
1067
  */
1214
1068
  matchLocationFromEvaluationName(evaluationName) {
1215
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1216
- .location;
1069
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1217
1070
  }
1218
1071
  /**
1219
1072
  * Parse the evaluation from Evaluation resource.
@@ -1223,8 +1076,7 @@ class EvaluationServiceClient {
1223
1076
  * @returns {string} A string representing the evaluation.
1224
1077
  */
1225
1078
  matchEvaluationFromEvaluationName(evaluationName) {
1226
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1227
- .evaluation;
1079
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1228
1080
  }
1229
1081
  /**
1230
1082
  * Return a fully-qualified location resource name string.
@@ -3324,8 +3176,7 @@ class EvaluationServiceClient {
3324
3176
  * @returns {string} A string representing the project.
3325
3177
  */
3326
3178
  matchProjectFromSampleQueryName(sampleQueryName) {
3327
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3328
- .project;
3179
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3329
3180
  }
3330
3181
  /**
3331
3182
  * Parse the location from SampleQuery resource.
@@ -3335,8 +3186,7 @@ class EvaluationServiceClient {
3335
3186
  * @returns {string} A string representing the location.
3336
3187
  */
3337
3188
  matchLocationFromSampleQueryName(sampleQueryName) {
3338
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3339
- .location;
3189
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3340
3190
  }
3341
3191
  /**
3342
3192
  * Parse the sample_query_set from SampleQuery resource.
@@ -3346,8 +3196,7 @@ class EvaluationServiceClient {
3346
3196
  * @returns {string} A string representing the sample_query_set.
3347
3197
  */
3348
3198
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3349
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3350
- .sample_query_set;
3199
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3351
3200
  }
3352
3201
  /**
3353
3202
  * Parse the sample_query from SampleQuery resource.
@@ -3357,8 +3206,7 @@ class EvaluationServiceClient {
3357
3206
  * @returns {string} A string representing the sample_query.
3358
3207
  */
3359
3208
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3360
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3361
- .sample_query;
3209
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3362
3210
  }
3363
3211
  /**
3364
3212
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3417,8 +3265,8 @@ class EvaluationServiceClient {
3417
3265
  this._log.info('ending gRPC channel');
3418
3266
  this._terminated = true;
3419
3267
  stub.close();
3420
- this.locationsClient.close();
3421
- this.operationsClient.close();
3268
+ this.locationsClient.close().catch(err => { throw err; });
3269
+ void this.operationsClient.close();
3422
3270
  });
3423
3271
  }
3424
3272
  return Promise.resolve();