@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 SampleQueryServiceClient {
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 SampleQueryServiceClient {
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,127 +208,28 @@ class SampleQueryServiceClient {
214
208
  // (e.g. 50 results at a time, with tokens to get subsequent
215
209
  // pages). Denote the keys used for pagination and results.
216
210
  this.descriptors.page = {
217
- listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries'),
211
+ listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries')
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: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
233
- body: '*',
234
- additional_bindings: [
235
- {
236
- post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
237
- body: '*',
238
- },
239
- ],
240
- },
241
- {
242
- selector: 'google.longrunning.Operations.GetOperation',
243
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
244
- additional_bindings: [
245
- {
246
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
247
- },
248
- {
249
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
250
- },
251
- {
252
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
253
- },
254
- {
255
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
256
- },
257
- {
258
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
259
- },
260
- {
261
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
262
- },
263
- {
264
- get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
265
- },
266
- {
267
- get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
268
- },
269
- {
270
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
271
- },
272
- {
273
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
274
- },
275
- {
276
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
277
- },
278
- {
279
- get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}',
280
- },
281
- { get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
282
- {
283
- get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
284
- },
285
- { get: '/v1beta/{name=projects/*/operations/*}' },
286
- ],
287
- },
288
- {
289
- selector: 'google.longrunning.Operations.ListOperations',
290
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
291
- additional_bindings: [
292
- {
293
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
294
- },
295
- {
296
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
297
- },
298
- {
299
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
300
- },
301
- {
302
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
303
- },
304
- {
305
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
306
- },
307
- {
308
- get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
309
- },
310
- {
311
- get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
312
- },
313
- {
314
- get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
315
- },
316
- {
317
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
318
- },
319
- {
320
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
321
- },
322
- {
323
- get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
324
- },
325
- { get: '/v1beta/{name=projects/*/locations/*}/operations' },
326
- { get: '/v1beta/{name=projects/*}/operations' },
327
- ],
328
- },
329
- ];
223
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
224
+ }, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1beta/{name=projects/*/operations/*}', }],
225
+ }, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*}/operations', }, { get: '/v1beta/{name=projects/*}/operations', }],
226
+ }];
330
227
  }
331
- this.operationsClient = this._gaxModule
332
- .lro(lroOptions)
333
- .operationsClient(opts);
228
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
334
229
  const importSampleQueriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSampleQueriesResponse');
335
230
  const importSampleQueriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSampleQueriesMetadata');
336
231
  this.descriptors.longrunning = {
337
- importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata)),
232
+ importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata))
338
233
  };
339
234
  // Put together the default options sent with requests.
340
235
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.SampleQueryService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -363,21 +258,13 @@ class SampleQueryServiceClient {
363
258
  }
364
259
  // Put together the "service stub" for
365
260
  // google.cloud.discoveryengine.v1beta.SampleQueryService.
366
- this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback
367
- ? this._protos.lookupService('google.cloud.discoveryengine.v1beta.SampleQueryService')
368
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
369
- this._protos.google.cloud.discoveryengine.v1beta
370
- .SampleQueryService, this._opts, this._providedCustomServicePath);
261
+ this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
262
+ this._protos.lookupService('google.cloud.discoveryengine.v1beta.SampleQueryService') :
263
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
264
+ this._protos.google.cloud.discoveryengine.v1beta.SampleQueryService, this._opts, this._providedCustomServicePath);
371
265
  // Iterate over each of the methods that the service provides
372
266
  // and create an API call method for each.
373
- const sampleQueryServiceStubMethods = [
374
- 'getSampleQuery',
375
- 'listSampleQueries',
376
- 'createSampleQuery',
377
- 'updateSampleQuery',
378
- 'deleteSampleQuery',
379
- 'importSampleQueries',
380
- ];
267
+ const sampleQueryServiceStubMethods = ['getSampleQuery', 'listSampleQueries', 'createSampleQuery', 'updateSampleQuery', 'deleteSampleQuery', 'importSampleQueries'];
381
268
  for (const methodName of sampleQueryServiceStubMethods) {
382
269
  const callPromise = this.sampleQueryServiceStub.then(stub => (...args) => {
383
270
  if (this._terminated) {
@@ -402,8 +289,7 @@ class SampleQueryServiceClient {
402
289
  * @returns {string} The DNS address for this service.
403
290
  */
404
291
  static get servicePath() {
405
- if (typeof process === 'object' &&
406
- typeof process.emitWarning === 'function') {
292
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
407
293
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
408
294
  }
409
295
  return 'discoveryengine.googleapis.com';
@@ -414,8 +300,7 @@ class SampleQueryServiceClient {
414
300
  * @returns {string} The DNS address for this service.
415
301
  */
416
302
  static get apiEndpoint() {
417
- if (typeof process === 'object' &&
418
- typeof process.emitWarning === 'function') {
303
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
419
304
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
420
305
  }
421
306
  return 'discoveryengine.googleapis.com';
@@ -443,7 +328,9 @@ class SampleQueryServiceClient {
443
328
  * @returns {string[]} List of default scopes.
444
329
  */
445
330
  static get scopes() {
446
- return ['https://www.googleapis.com/auth/cloud-platform'];
331
+ return [
332
+ 'https://www.googleapis.com/auth/cloud-platform'
333
+ ];
447
334
  }
448
335
  /**
449
336
  * Return the project ID used by this class.
@@ -469,13 +356,10 @@ class SampleQueryServiceClient {
469
356
  options = options || {};
470
357
  options.otherArgs = options.otherArgs || {};
471
358
  options.otherArgs.headers = options.otherArgs.headers || {};
472
- options.otherArgs.headers['x-goog-request-params'] =
473
- this._gaxModule.routingHeader.fromParams({
474
- name: request.name ?? '',
475
- });
476
- this.initialize().catch(err => {
477
- throw err;
359
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
360
+ 'name': request.name ?? '',
478
361
  });
362
+ this.initialize().catch(err => { throw err; });
479
363
  this._log.info('getSampleQuery request %j', request);
480
364
  const wrappedCallback = callback
481
365
  ? (error, response, options, rawResponse) => {
@@ -483,11 +367,16 @@ class SampleQueryServiceClient {
483
367
  callback(error, response, options, rawResponse); // We verified callback above.
484
368
  }
485
369
  : undefined;
486
- return this.innerApiCalls
487
- .getSampleQuery(request, options, wrappedCallback)
370
+ return this.innerApiCalls.getSampleQuery(request, options, wrappedCallback)
488
371
  ?.then(([response, options, rawResponse]) => {
489
372
  this._log.info('getSampleQuery response %j', response);
490
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;
491
380
  });
492
381
  }
493
382
  createSampleQuery(request, optionsOrCallback, callback) {
@@ -503,13 +392,10 @@ class SampleQueryServiceClient {
503
392
  options = options || {};
504
393
  options.otherArgs = options.otherArgs || {};
505
394
  options.otherArgs.headers = options.otherArgs.headers || {};
506
- options.otherArgs.headers['x-goog-request-params'] =
507
- this._gaxModule.routingHeader.fromParams({
508
- parent: request.parent ?? '',
509
- });
510
- this.initialize().catch(err => {
511
- throw err;
395
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
396
+ 'parent': request.parent ?? '',
512
397
  });
398
+ this.initialize().catch(err => { throw err; });
513
399
  this._log.info('createSampleQuery request %j', request);
514
400
  const wrappedCallback = callback
515
401
  ? (error, response, options, rawResponse) => {
@@ -517,11 +403,16 @@ class SampleQueryServiceClient {
517
403
  callback(error, response, options, rawResponse); // We verified callback above.
518
404
  }
519
405
  : undefined;
520
- return this.innerApiCalls
521
- .createSampleQuery(request, options, wrappedCallback)
406
+ return this.innerApiCalls.createSampleQuery(request, options, wrappedCallback)
522
407
  ?.then(([response, options, rawResponse]) => {
523
408
  this._log.info('createSampleQuery response %j', response);
524
409
  return [response, options, rawResponse];
410
+ }).catch((error) => {
411
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
412
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
413
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
414
+ }
415
+ throw error;
525
416
  });
526
417
  }
527
418
  updateSampleQuery(request, optionsOrCallback, callback) {
@@ -537,13 +428,10 @@ class SampleQueryServiceClient {
537
428
  options = options || {};
538
429
  options.otherArgs = options.otherArgs || {};
539
430
  options.otherArgs.headers = options.otherArgs.headers || {};
540
- options.otherArgs.headers['x-goog-request-params'] =
541
- this._gaxModule.routingHeader.fromParams({
542
- 'sample_query.name': request.sampleQuery.name ?? '',
543
- });
544
- this.initialize().catch(err => {
545
- throw err;
431
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
432
+ 'sample_query.name': request.sampleQuery.name ?? '',
546
433
  });
434
+ this.initialize().catch(err => { throw err; });
547
435
  this._log.info('updateSampleQuery request %j', request);
548
436
  const wrappedCallback = callback
549
437
  ? (error, response, options, rawResponse) => {
@@ -551,11 +439,16 @@ class SampleQueryServiceClient {
551
439
  callback(error, response, options, rawResponse); // We verified callback above.
552
440
  }
553
441
  : undefined;
554
- return this.innerApiCalls
555
- .updateSampleQuery(request, options, wrappedCallback)
442
+ return this.innerApiCalls.updateSampleQuery(request, options, wrappedCallback)
556
443
  ?.then(([response, options, rawResponse]) => {
557
444
  this._log.info('updateSampleQuery response %j', response);
558
445
  return [response, options, rawResponse];
446
+ }).catch((error) => {
447
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
448
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
449
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
450
+ }
451
+ throw error;
559
452
  });
560
453
  }
561
454
  deleteSampleQuery(request, optionsOrCallback, callback) {
@@ -571,13 +464,10 @@ class SampleQueryServiceClient {
571
464
  options = options || {};
572
465
  options.otherArgs = options.otherArgs || {};
573
466
  options.otherArgs.headers = options.otherArgs.headers || {};
574
- options.otherArgs.headers['x-goog-request-params'] =
575
- this._gaxModule.routingHeader.fromParams({
576
- name: request.name ?? '',
577
- });
578
- this.initialize().catch(err => {
579
- throw err;
467
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
468
+ 'name': request.name ?? '',
580
469
  });
470
+ this.initialize().catch(err => { throw err; });
581
471
  this._log.info('deleteSampleQuery request %j', request);
582
472
  const wrappedCallback = callback
583
473
  ? (error, response, options, rawResponse) => {
@@ -585,11 +475,16 @@ class SampleQueryServiceClient {
585
475
  callback(error, response, options, rawResponse); // We verified callback above.
586
476
  }
587
477
  : undefined;
588
- return this.innerApiCalls
589
- .deleteSampleQuery(request, options, wrappedCallback)
478
+ return this.innerApiCalls.deleteSampleQuery(request, options, wrappedCallback)
590
479
  ?.then(([response, options, rawResponse]) => {
591
480
  this._log.info('deleteSampleQuery response %j', response);
592
481
  return [response, options, rawResponse];
482
+ }).catch((error) => {
483
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
484
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
485
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
486
+ }
487
+ throw error;
593
488
  });
594
489
  }
595
490
  importSampleQueries(request, optionsOrCallback, callback) {
@@ -605,13 +500,10 @@ class SampleQueryServiceClient {
605
500
  options = options || {};
606
501
  options.otherArgs = options.otherArgs || {};
607
502
  options.otherArgs.headers = options.otherArgs.headers || {};
608
- options.otherArgs.headers['x-goog-request-params'] =
609
- this._gaxModule.routingHeader.fromParams({
610
- parent: request.parent ?? '',
611
- });
612
- this.initialize().catch(err => {
613
- throw err;
503
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
504
+ 'parent': request.parent ?? '',
614
505
  });
506
+ this.initialize().catch(err => { throw err; });
615
507
  const wrappedCallback = callback
616
508
  ? (error, response, rawResponse, _) => {
617
509
  this._log.info('importSampleQueries response %j', rawResponse);
@@ -619,8 +511,7 @@ class SampleQueryServiceClient {
619
511
  }
620
512
  : undefined;
621
513
  this._log.info('importSampleQueries request %j', request);
622
- return this.innerApiCalls
623
- .importSampleQueries(request, options, wrappedCallback)
514
+ return this.innerApiCalls.importSampleQueries(request, options, wrappedCallback)
624
515
  ?.then(([response, rawResponse, _]) => {
625
516
  this._log.info('importSampleQueries response %j', rawResponse);
626
517
  return [response, rawResponse, _];
@@ -657,13 +548,10 @@ class SampleQueryServiceClient {
657
548
  options = options || {};
658
549
  options.otherArgs = options.otherArgs || {};
659
550
  options.otherArgs.headers = options.otherArgs.headers || {};
660
- options.otherArgs.headers['x-goog-request-params'] =
661
- this._gaxModule.routingHeader.fromParams({
662
- parent: request.parent ?? '',
663
- });
664
- this.initialize().catch(err => {
665
- throw err;
551
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
552
+ 'parent': request.parent ?? '',
666
553
  });
554
+ this.initialize().catch(err => { throw err; });
667
555
  const wrappedCallback = callback
668
556
  ? (error, values, nextPageRequest, rawResponse) => {
669
557
  this._log.info('listSampleQueries values %j', values);
@@ -724,15 +612,12 @@ class SampleQueryServiceClient {
724
612
  options = options || {};
725
613
  options.otherArgs = options.otherArgs || {};
726
614
  options.otherArgs.headers = options.otherArgs.headers || {};
727
- options.otherArgs.headers['x-goog-request-params'] =
728
- this._gaxModule.routingHeader.fromParams({
729
- parent: request.parent ?? '',
730
- });
615
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
616
+ 'parent': request.parent ?? '',
617
+ });
731
618
  const defaultCallSettings = this._defaults['listSampleQueries'];
732
619
  const callSettings = defaultCallSettings.merge(options);
733
- this.initialize().catch(err => {
734
- throw err;
735
- });
620
+ this.initialize().catch(err => { throw err; });
736
621
  this._log.info('listSampleQueries stream %j', request);
737
622
  return this.descriptors.page.listSampleQueries.createStream(this.innerApiCalls.listSampleQueries, request, callSettings);
738
623
  }
@@ -785,103 +670,100 @@ class SampleQueryServiceClient {
785
670
  options = options || {};
786
671
  options.otherArgs = options.otherArgs || {};
787
672
  options.otherArgs.headers = options.otherArgs.headers || {};
788
- options.otherArgs.headers['x-goog-request-params'] =
789
- this._gaxModule.routingHeader.fromParams({
790
- parent: request.parent ?? '',
791
- });
673
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
674
+ 'parent': request.parent ?? '',
675
+ });
792
676
  const defaultCallSettings = this._defaults['listSampleQueries'];
793
677
  const callSettings = defaultCallSettings.merge(options);
794
- this.initialize().catch(err => {
795
- throw err;
796
- });
678
+ this.initialize().catch(err => { throw err; });
797
679
  this._log.info('listSampleQueries iterate %j', request);
798
680
  return this.descriptors.page.listSampleQueries.asyncIterate(this.innerApiCalls['listSampleQueries'], request, callSettings);
799
681
  }
800
682
  /**
801
- * Gets information about a location.
802
- *
803
- * @param {Object} request
804
- * The request object that will be sent.
805
- * @param {string} request.name
806
- * Resource name for the location.
807
- * @param {object} [options]
808
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
809
- * @returns {Promise} - The promise which resolves to an array.
810
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
811
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
812
- * for more details and examples.
813
- * @example
814
- * ```
815
- * const [response] = await client.getLocation(request);
816
- * ```
817
- */
683
+ * Gets information about a location.
684
+ *
685
+ * @param {Object} request
686
+ * The request object that will be sent.
687
+ * @param {string} request.name
688
+ * Resource name for the location.
689
+ * @param {object} [options]
690
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
691
+ * @returns {Promise} - The promise which resolves to an array.
692
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
693
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
694
+ * for more details and examples.
695
+ * @example
696
+ * ```
697
+ * const [response] = await client.getLocation(request);
698
+ * ```
699
+ */
818
700
  getLocation(request, options, callback) {
819
701
  return this.locationsClient.getLocation(request, options, callback);
820
702
  }
821
703
  /**
822
- * Lists information about the supported locations for this service. Returns an iterable object.
823
- *
824
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
825
- * @param {Object} request
826
- * The request object that will be sent.
827
- * @param {string} request.name
828
- * The resource that owns the locations collection, if applicable.
829
- * @param {string} request.filter
830
- * The standard list filter.
831
- * @param {number} request.pageSize
832
- * The standard list page size.
833
- * @param {string} request.pageToken
834
- * The standard list page token.
835
- * @param {object} [options]
836
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
837
- * @returns {Object}
838
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
839
- * When you iterate the returned iterable, each element will be an object representing
840
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
841
- * so you can stop the iteration when you don't need more results.
842
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
843
- * for more details and examples.
844
- * @example
845
- * ```
846
- * const iterable = client.listLocationsAsync(request);
847
- * for await (const response of iterable) {
848
- * // process response
849
- * }
850
- * ```
851
- */
704
+ * Lists information about the supported locations for this service. Returns an iterable object.
705
+ *
706
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
707
+ * @param {Object} request
708
+ * The request object that will be sent.
709
+ * @param {string} request.name
710
+ * The resource that owns the locations collection, if applicable.
711
+ * @param {string} request.filter
712
+ * The standard list filter.
713
+ * @param {number} request.pageSize
714
+ * The standard list page size.
715
+ * @param {string} request.pageToken
716
+ * The standard list page token.
717
+ * @param {object} [options]
718
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
719
+ * @returns {Object}
720
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
721
+ * When you iterate the returned iterable, each element will be an object representing
722
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
723
+ * so you can stop the iteration when you don't need more results.
724
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
725
+ * for more details and examples.
726
+ * @example
727
+ * ```
728
+ * const iterable = client.listLocationsAsync(request);
729
+ * for await (const response of iterable) {
730
+ * // process response
731
+ * }
732
+ * ```
733
+ */
852
734
  listLocationsAsync(request, options) {
853
735
  return this.locationsClient.listLocationsAsync(request, options);
854
736
  }
855
737
  /**
856
- * Gets the latest state of a long-running operation. Clients can use this
857
- * method to poll the operation result at intervals as recommended by the API
858
- * service.
859
- *
860
- * @param {Object} request - The request object that will be sent.
861
- * @param {string} request.name - The name of the operation resource.
862
- * @param {Object=} options
863
- * Optional parameters. You can override the default settings for this call,
864
- * e.g, timeout, retries, paginations, etc. See {@link
865
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
866
- * for the details.
867
- * @param {function(?Error, ?Object)=} callback
868
- * The function which will be called with the result of the API call.
869
- *
870
- * The second parameter to the callback is an object representing
871
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
872
- * @return {Promise} - The promise which resolves to an array.
873
- * The first element of the array is an object representing
874
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
875
- * The promise has a method named "cancel" which cancels the ongoing API call.
876
- *
877
- * @example
878
- * ```
879
- * const client = longrunning.operationsClient();
880
- * const name = '';
881
- * const [response] = await client.getOperation({name});
882
- * // doThingsWith(response)
883
- * ```
884
- */
738
+ * Gets the latest state of a long-running operation. Clients can use this
739
+ * method to poll the operation result at intervals as recommended by the API
740
+ * service.
741
+ *
742
+ * @param {Object} request - The request object that will be sent.
743
+ * @param {string} request.name - The name of the operation resource.
744
+ * @param {Object=} options
745
+ * Optional parameters. You can override the default settings for this call,
746
+ * e.g, timeout, retries, paginations, etc. See {@link
747
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
748
+ * for the details.
749
+ * @param {function(?Error, ?Object)=} callback
750
+ * The function which will be called with the result of the API call.
751
+ *
752
+ * The second parameter to the callback is an object representing
753
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
754
+ * @return {Promise} - The promise which resolves to an array.
755
+ * The first element of the array is an object representing
756
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
757
+ * The promise has a method named "cancel" which cancels the ongoing API call.
758
+ *
759
+ * @example
760
+ * ```
761
+ * const client = longrunning.operationsClient();
762
+ * const name = '';
763
+ * const [response] = await client.getOperation({name});
764
+ * // doThingsWith(response)
765
+ * ```
766
+ */
885
767
  getOperation(request, optionsOrCallback, callback) {
886
768
  let options;
887
769
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1115,8 +997,7 @@ class SampleQueryServiceClient {
1115
997
  * @returns {string} A string representing the project.
1116
998
  */
1117
999
  matchProjectFromEvaluationName(evaluationName) {
1118
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1119
- .project;
1000
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1120
1001
  }
1121
1002
  /**
1122
1003
  * Parse the location from Evaluation resource.
@@ -1126,8 +1007,7 @@ class SampleQueryServiceClient {
1126
1007
  * @returns {string} A string representing the location.
1127
1008
  */
1128
1009
  matchLocationFromEvaluationName(evaluationName) {
1129
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1130
- .location;
1010
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1131
1011
  }
1132
1012
  /**
1133
1013
  * Parse the evaluation from Evaluation resource.
@@ -1137,8 +1017,7 @@ class SampleQueryServiceClient {
1137
1017
  * @returns {string} A string representing the evaluation.
1138
1018
  */
1139
1019
  matchEvaluationFromEvaluationName(evaluationName) {
1140
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1141
- .evaluation;
1020
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1142
1021
  }
1143
1022
  /**
1144
1023
  * Return a fully-qualified groundingConfig resource name string.
@@ -3376,8 +3255,7 @@ class SampleQueryServiceClient {
3376
3255
  * @returns {string} A string representing the project.
3377
3256
  */
3378
3257
  matchProjectFromSampleQueryName(sampleQueryName) {
3379
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3380
- .project;
3258
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3381
3259
  }
3382
3260
  /**
3383
3261
  * Parse the location from SampleQuery resource.
@@ -3387,8 +3265,7 @@ class SampleQueryServiceClient {
3387
3265
  * @returns {string} A string representing the location.
3388
3266
  */
3389
3267
  matchLocationFromSampleQueryName(sampleQueryName) {
3390
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3391
- .location;
3268
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3392
3269
  }
3393
3270
  /**
3394
3271
  * Parse the sample_query_set from SampleQuery resource.
@@ -3398,8 +3275,7 @@ class SampleQueryServiceClient {
3398
3275
  * @returns {string} A string representing the sample_query_set.
3399
3276
  */
3400
3277
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3401
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3402
- .sample_query_set;
3278
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3403
3279
  }
3404
3280
  /**
3405
3281
  * Parse the sample_query from SampleQuery resource.
@@ -3409,8 +3285,7 @@ class SampleQueryServiceClient {
3409
3285
  * @returns {string} A string representing the sample_query.
3410
3286
  */
3411
3287
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3412
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3413
- .sample_query;
3288
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3414
3289
  }
3415
3290
  /**
3416
3291
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3469,8 +3344,8 @@ class SampleQueryServiceClient {
3469
3344
  this._log.info('ending gRPC channel');
3470
3345
  this._terminated = true;
3471
3346
  stub.close();
3472
- this.locationsClient.close();
3473
- this.operationsClient.close();
3347
+ this.locationsClient.close().catch(err => { throw err; });
3348
+ void this.operationsClient.close();
3474
3349
  });
3475
3350
  }
3476
3351
  return Promise.resolve();