@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 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
  }
@@ -212,7 +206,7 @@ class SampleQueryServiceClient {
212
206
  // (e.g. 50 results at a time, with tokens to get subsequent
213
207
  // pages). Denote the keys used for pagination and results.
214
208
  this.descriptors.page = {
215
- listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries'),
209
+ listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries')
216
210
  };
217
211
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
218
212
  // This API contains "long-running operations", which return a
@@ -220,125 +214,20 @@ class SampleQueryServiceClient {
220
214
  // rather than holding a request open.
221
215
  const lroOptions = {
222
216
  auth: this.auth,
223
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
217
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
224
218
  };
225
219
  if (opts.fallback) {
226
220
  lroOptions.protoJson = protoFilesRoot;
227
- lroOptions.httpRules = [
228
- {
229
- selector: 'google.longrunning.Operations.CancelOperation',
230
- post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel',
231
- body: '*',
232
- additional_bindings: [
233
- {
234
- post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
235
- body: '*',
236
- },
237
- ],
238
- },
239
- {
240
- selector: 'google.longrunning.Operations.GetOperation',
241
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
242
- additional_bindings: [
243
- {
244
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
245
- },
246
- {
247
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
248
- },
249
- {
250
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
251
- },
252
- {
253
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
254
- },
255
- {
256
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
257
- },
258
- {
259
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
260
- },
261
- {
262
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
263
- },
264
- {
265
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
266
- },
267
- {
268
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
269
- },
270
- {
271
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
272
- },
273
- {
274
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
275
- },
276
- {
277
- get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
278
- },
279
- {
280
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
281
- },
282
- { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
283
- {
284
- get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
285
- },
286
- { get: '/v1alpha/{name=projects/*/operations/*}' },
287
- ],
288
- },
289
- {
290
- selector: 'google.longrunning.Operations.ListOperations',
291
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
292
- additional_bindings: [
293
- {
294
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
295
- },
296
- {
297
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
298
- },
299
- {
300
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
301
- },
302
- {
303
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
304
- },
305
- {
306
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
307
- },
308
- {
309
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
310
- },
311
- {
312
- get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
313
- },
314
- {
315
- get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
316
- },
317
- {
318
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
319
- },
320
- {
321
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
322
- },
323
- {
324
- get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
325
- },
326
- {
327
- get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
328
- },
329
- { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
330
- { get: '/v1alpha/{name=projects/*}/operations' },
331
- ],
332
- },
333
- ];
221
+ 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: '*', }],
222
+ }, { 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/*}', }],
223
+ }, { 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', }],
224
+ }];
334
225
  }
335
- this.operationsClient = this._gaxModule
336
- .lro(lroOptions)
337
- .operationsClient(opts);
226
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
338
227
  const importSampleQueriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesResponse');
339
228
  const importSampleQueriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportSampleQueriesMetadata');
340
229
  this.descriptors.longrunning = {
341
- importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata)),
230
+ importSampleQueries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSampleQueriesResponse.decode.bind(importSampleQueriesResponse), importSampleQueriesMetadata.decode.bind(importSampleQueriesMetadata))
342
231
  };
343
232
  // Put together the default options sent with requests.
344
233
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SampleQueryService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -367,21 +256,13 @@ class SampleQueryServiceClient {
367
256
  }
368
257
  // Put together the "service stub" for
369
258
  // google.cloud.discoveryengine.v1alpha.SampleQueryService.
370
- this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback
371
- ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SampleQueryService')
372
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
373
- this._protos.google.cloud.discoveryengine.v1alpha
374
- .SampleQueryService, this._opts, this._providedCustomServicePath);
259
+ this.sampleQueryServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
260
+ this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SampleQueryService') :
261
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
262
+ this._protos.google.cloud.discoveryengine.v1alpha.SampleQueryService, this._opts, this._providedCustomServicePath);
375
263
  // Iterate over each of the methods that the service provides
376
264
  // and create an API call method for each.
377
- const sampleQueryServiceStubMethods = [
378
- 'getSampleQuery',
379
- 'listSampleQueries',
380
- 'createSampleQuery',
381
- 'updateSampleQuery',
382
- 'deleteSampleQuery',
383
- 'importSampleQueries',
384
- ];
265
+ const sampleQueryServiceStubMethods = ['getSampleQuery', 'listSampleQueries', 'createSampleQuery', 'updateSampleQuery', 'deleteSampleQuery', 'importSampleQueries'];
385
266
  for (const methodName of sampleQueryServiceStubMethods) {
386
267
  const callPromise = this.sampleQueryServiceStub.then(stub => (...args) => {
387
268
  if (this._terminated) {
@@ -406,8 +287,7 @@ class SampleQueryServiceClient {
406
287
  * @returns {string} The DNS address for this service.
407
288
  */
408
289
  static get servicePath() {
409
- if (typeof process === 'object' &&
410
- typeof process.emitWarning === 'function') {
290
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
411
291
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
412
292
  }
413
293
  return 'discoveryengine.googleapis.com';
@@ -418,8 +298,7 @@ class SampleQueryServiceClient {
418
298
  * @returns {string} The DNS address for this service.
419
299
  */
420
300
  static get apiEndpoint() {
421
- if (typeof process === 'object' &&
422
- typeof process.emitWarning === 'function') {
301
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
423
302
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
424
303
  }
425
304
  return 'discoveryengine.googleapis.com';
@@ -447,7 +326,9 @@ class SampleQueryServiceClient {
447
326
  * @returns {string[]} List of default scopes.
448
327
  */
449
328
  static get scopes() {
450
- return ['https://www.googleapis.com/auth/cloud-platform'];
329
+ return [
330
+ 'https://www.googleapis.com/auth/cloud-platform'
331
+ ];
451
332
  }
452
333
  /**
453
334
  * Return the project ID used by this class.
@@ -473,13 +354,10 @@ class SampleQueryServiceClient {
473
354
  options = options || {};
474
355
  options.otherArgs = options.otherArgs || {};
475
356
  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;
357
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
358
+ 'name': request.name ?? '',
482
359
  });
360
+ this.initialize().catch(err => { throw err; });
483
361
  this._log.info('getSampleQuery request %j', request);
484
362
  const wrappedCallback = callback
485
363
  ? (error, response, options, rawResponse) => {
@@ -487,8 +365,7 @@ class SampleQueryServiceClient {
487
365
  callback(error, response, options, rawResponse); // We verified callback above.
488
366
  }
489
367
  : undefined;
490
- return this.innerApiCalls
491
- .getSampleQuery(request, options, wrappedCallback)
368
+ return this.innerApiCalls.getSampleQuery(request, options, wrappedCallback)
492
369
  ?.then(([response, options, rawResponse]) => {
493
370
  this._log.info('getSampleQuery response %j', response);
494
371
  return [response, options, rawResponse];
@@ -507,13 +384,10 @@ class SampleQueryServiceClient {
507
384
  options = options || {};
508
385
  options.otherArgs = options.otherArgs || {};
509
386
  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;
387
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
388
+ 'parent': request.parent ?? '',
516
389
  });
390
+ this.initialize().catch(err => { throw err; });
517
391
  this._log.info('createSampleQuery request %j', request);
518
392
  const wrappedCallback = callback
519
393
  ? (error, response, options, rawResponse) => {
@@ -521,8 +395,7 @@ class SampleQueryServiceClient {
521
395
  callback(error, response, options, rawResponse); // We verified callback above.
522
396
  }
523
397
  : undefined;
524
- return this.innerApiCalls
525
- .createSampleQuery(request, options, wrappedCallback)
398
+ return this.innerApiCalls.createSampleQuery(request, options, wrappedCallback)
526
399
  ?.then(([response, options, rawResponse]) => {
527
400
  this._log.info('createSampleQuery response %j', response);
528
401
  return [response, options, rawResponse];
@@ -541,13 +414,10 @@ class SampleQueryServiceClient {
541
414
  options = options || {};
542
415
  options.otherArgs = options.otherArgs || {};
543
416
  options.otherArgs.headers = options.otherArgs.headers || {};
544
- options.otherArgs.headers['x-goog-request-params'] =
545
- this._gaxModule.routingHeader.fromParams({
546
- 'sample_query.name': request.sampleQuery.name ?? '',
547
- });
548
- this.initialize().catch(err => {
549
- throw err;
417
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
418
+ 'sample_query.name': request.sampleQuery.name ?? '',
550
419
  });
420
+ this.initialize().catch(err => { throw err; });
551
421
  this._log.info('updateSampleQuery request %j', request);
552
422
  const wrappedCallback = callback
553
423
  ? (error, response, options, rawResponse) => {
@@ -555,8 +425,7 @@ class SampleQueryServiceClient {
555
425
  callback(error, response, options, rawResponse); // We verified callback above.
556
426
  }
557
427
  : undefined;
558
- return this.innerApiCalls
559
- .updateSampleQuery(request, options, wrappedCallback)
428
+ return this.innerApiCalls.updateSampleQuery(request, options, wrappedCallback)
560
429
  ?.then(([response, options, rawResponse]) => {
561
430
  this._log.info('updateSampleQuery response %j', response);
562
431
  return [response, options, rawResponse];
@@ -575,13 +444,10 @@ class SampleQueryServiceClient {
575
444
  options = options || {};
576
445
  options.otherArgs = options.otherArgs || {};
577
446
  options.otherArgs.headers = options.otherArgs.headers || {};
578
- options.otherArgs.headers['x-goog-request-params'] =
579
- this._gaxModule.routingHeader.fromParams({
580
- name: request.name ?? '',
581
- });
582
- this.initialize().catch(err => {
583
- throw err;
447
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
448
+ 'name': request.name ?? '',
584
449
  });
450
+ this.initialize().catch(err => { throw err; });
585
451
  this._log.info('deleteSampleQuery request %j', request);
586
452
  const wrappedCallback = callback
587
453
  ? (error, response, options, rawResponse) => {
@@ -589,8 +455,7 @@ class SampleQueryServiceClient {
589
455
  callback(error, response, options, rawResponse); // We verified callback above.
590
456
  }
591
457
  : undefined;
592
- return this.innerApiCalls
593
- .deleteSampleQuery(request, options, wrappedCallback)
458
+ return this.innerApiCalls.deleteSampleQuery(request, options, wrappedCallback)
594
459
  ?.then(([response, options, rawResponse]) => {
595
460
  this._log.info('deleteSampleQuery response %j', response);
596
461
  return [response, options, rawResponse];
@@ -609,13 +474,10 @@ class SampleQueryServiceClient {
609
474
  options = options || {};
610
475
  options.otherArgs = options.otherArgs || {};
611
476
  options.otherArgs.headers = options.otherArgs.headers || {};
612
- options.otherArgs.headers['x-goog-request-params'] =
613
- this._gaxModule.routingHeader.fromParams({
614
- parent: request.parent ?? '',
615
- });
616
- this.initialize().catch(err => {
617
- throw err;
477
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
478
+ 'parent': request.parent ?? '',
618
479
  });
480
+ this.initialize().catch(err => { throw err; });
619
481
  const wrappedCallback = callback
620
482
  ? (error, response, rawResponse, _) => {
621
483
  this._log.info('importSampleQueries response %j', rawResponse);
@@ -623,8 +485,7 @@ class SampleQueryServiceClient {
623
485
  }
624
486
  : undefined;
625
487
  this._log.info('importSampleQueries request %j', request);
626
- return this.innerApiCalls
627
- .importSampleQueries(request, options, wrappedCallback)
488
+ return this.innerApiCalls.importSampleQueries(request, options, wrappedCallback)
628
489
  ?.then(([response, rawResponse, _]) => {
629
490
  this._log.info('importSampleQueries response %j', rawResponse);
630
491
  return [response, rawResponse, _];
@@ -661,13 +522,10 @@ class SampleQueryServiceClient {
661
522
  options = options || {};
662
523
  options.otherArgs = options.otherArgs || {};
663
524
  options.otherArgs.headers = options.otherArgs.headers || {};
664
- options.otherArgs.headers['x-goog-request-params'] =
665
- this._gaxModule.routingHeader.fromParams({
666
- parent: request.parent ?? '',
667
- });
668
- this.initialize().catch(err => {
669
- throw err;
525
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
526
+ 'parent': request.parent ?? '',
670
527
  });
528
+ this.initialize().catch(err => { throw err; });
671
529
  const wrappedCallback = callback
672
530
  ? (error, values, nextPageRequest, rawResponse) => {
673
531
  this._log.info('listSampleQueries values %j', values);
@@ -728,15 +586,12 @@ class SampleQueryServiceClient {
728
586
  options = options || {};
729
587
  options.otherArgs = options.otherArgs || {};
730
588
  options.otherArgs.headers = options.otherArgs.headers || {};
731
- options.otherArgs.headers['x-goog-request-params'] =
732
- this._gaxModule.routingHeader.fromParams({
733
- parent: request.parent ?? '',
734
- });
589
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
590
+ 'parent': request.parent ?? '',
591
+ });
735
592
  const defaultCallSettings = this._defaults['listSampleQueries'];
736
593
  const callSettings = defaultCallSettings.merge(options);
737
- this.initialize().catch(err => {
738
- throw err;
739
- });
594
+ this.initialize().catch(err => { throw err; });
740
595
  this._log.info('listSampleQueries stream %j', request);
741
596
  return this.descriptors.page.listSampleQueries.createStream(this.innerApiCalls.listSampleQueries, request, callSettings);
742
597
  }
@@ -789,103 +644,100 @@ class SampleQueryServiceClient {
789
644
  options = options || {};
790
645
  options.otherArgs = options.otherArgs || {};
791
646
  options.otherArgs.headers = options.otherArgs.headers || {};
792
- options.otherArgs.headers['x-goog-request-params'] =
793
- this._gaxModule.routingHeader.fromParams({
794
- parent: request.parent ?? '',
795
- });
647
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
648
+ 'parent': request.parent ?? '',
649
+ });
796
650
  const defaultCallSettings = this._defaults['listSampleQueries'];
797
651
  const callSettings = defaultCallSettings.merge(options);
798
- this.initialize().catch(err => {
799
- throw err;
800
- });
652
+ this.initialize().catch(err => { throw err; });
801
653
  this._log.info('listSampleQueries iterate %j', request);
802
654
  return this.descriptors.page.listSampleQueries.asyncIterate(this.innerApiCalls['listSampleQueries'], request, callSettings);
803
655
  }
804
656
  /**
805
- * Gets information about a location.
806
- *
807
- * @param {Object} request
808
- * The request object that will be sent.
809
- * @param {string} request.name
810
- * Resource name for the location.
811
- * @param {object} [options]
812
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
813
- * @returns {Promise} - The promise which resolves to an array.
814
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
815
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
816
- * for more details and examples.
817
- * @example
818
- * ```
819
- * const [response] = await client.getLocation(request);
820
- * ```
821
- */
657
+ * Gets information about a location.
658
+ *
659
+ * @param {Object} request
660
+ * The request object that will be sent.
661
+ * @param {string} request.name
662
+ * Resource name for the location.
663
+ * @param {object} [options]
664
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
665
+ * @returns {Promise} - The promise which resolves to an array.
666
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
667
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
668
+ * for more details and examples.
669
+ * @example
670
+ * ```
671
+ * const [response] = await client.getLocation(request);
672
+ * ```
673
+ */
822
674
  getLocation(request, options, callback) {
823
675
  return this.locationsClient.getLocation(request, options, callback);
824
676
  }
825
677
  /**
826
- * Lists information about the supported locations for this service. Returns an iterable object.
827
- *
828
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
829
- * @param {Object} request
830
- * The request object that will be sent.
831
- * @param {string} request.name
832
- * The resource that owns the locations collection, if applicable.
833
- * @param {string} request.filter
834
- * The standard list filter.
835
- * @param {number} request.pageSize
836
- * The standard list page size.
837
- * @param {string} request.pageToken
838
- * The standard list page token.
839
- * @param {object} [options]
840
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
841
- * @returns {Object}
842
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
843
- * When you iterate the returned iterable, each element will be an object representing
844
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
845
- * so you can stop the iteration when you don't need more results.
846
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
847
- * for more details and examples.
848
- * @example
849
- * ```
850
- * const iterable = client.listLocationsAsync(request);
851
- * for await (const response of iterable) {
852
- * // process response
853
- * }
854
- * ```
855
- */
678
+ * Lists information about the supported locations for this service. Returns an iterable object.
679
+ *
680
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
681
+ * @param {Object} request
682
+ * The request object that will be sent.
683
+ * @param {string} request.name
684
+ * The resource that owns the locations collection, if applicable.
685
+ * @param {string} request.filter
686
+ * The standard list filter.
687
+ * @param {number} request.pageSize
688
+ * The standard list page size.
689
+ * @param {string} request.pageToken
690
+ * The standard list page token.
691
+ * @param {object} [options]
692
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
693
+ * @returns {Object}
694
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
695
+ * When you iterate the returned iterable, each element will be an object representing
696
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
697
+ * so you can stop the iteration when you don't need more results.
698
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
699
+ * for more details and examples.
700
+ * @example
701
+ * ```
702
+ * const iterable = client.listLocationsAsync(request);
703
+ * for await (const response of iterable) {
704
+ * // process response
705
+ * }
706
+ * ```
707
+ */
856
708
  listLocationsAsync(request, options) {
857
709
  return this.locationsClient.listLocationsAsync(request, options);
858
710
  }
859
711
  /**
860
- * Gets the latest state of a long-running operation. Clients can use this
861
- * method to poll the operation result at intervals as recommended by the API
862
- * service.
863
- *
864
- * @param {Object} request - The request object that will be sent.
865
- * @param {string} request.name - The name of the operation resource.
866
- * @param {Object=} options
867
- * Optional parameters. You can override the default settings for this call,
868
- * e.g, timeout, retries, paginations, etc. See {@link
869
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
870
- * for the details.
871
- * @param {function(?Error, ?Object)=} callback
872
- * The function which will be called with the result of the API call.
873
- *
874
- * The second parameter to the callback is an object representing
875
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
876
- * @return {Promise} - The promise which resolves to an array.
877
- * The first element of the array is an object representing
878
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
879
- * The promise has a method named "cancel" which cancels the ongoing API call.
880
- *
881
- * @example
882
- * ```
883
- * const client = longrunning.operationsClient();
884
- * const name = '';
885
- * const [response] = await client.getOperation({name});
886
- * // doThingsWith(response)
887
- * ```
888
- */
712
+ * Gets the latest state of a long-running operation. Clients can use this
713
+ * method to poll the operation result at intervals as recommended by the API
714
+ * service.
715
+ *
716
+ * @param {Object} request - The request object that will be sent.
717
+ * @param {string} request.name - The name of the operation resource.
718
+ * @param {Object=} options
719
+ * Optional parameters. You can override the default settings for this call,
720
+ * e.g, timeout, retries, paginations, etc. See {@link
721
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
722
+ * for the details.
723
+ * @param {function(?Error, ?Object)=} callback
724
+ * The function which will be called with the result of the API call.
725
+ *
726
+ * The second parameter to the callback is an object representing
727
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
728
+ * @return {Promise} - The promise which resolves to an array.
729
+ * The first element of the array is an object representing
730
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
731
+ * The promise has a method named "cancel" which cancels the ongoing API call.
732
+ *
733
+ * @example
734
+ * ```
735
+ * const client = longrunning.operationsClient();
736
+ * const name = '';
737
+ * const [response] = await client.getOperation({name});
738
+ * // doThingsWith(response)
739
+ * ```
740
+ */
889
741
  getOperation(request, optionsOrCallback, callback) {
890
742
  let options;
891
743
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1060,8 +912,7 @@ class SampleQueryServiceClient {
1060
912
  * @returns {string} A string representing the project.
1061
913
  */
1062
914
  matchProjectFromAclConfigName(aclConfigName) {
1063
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1064
- .project;
915
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
1065
916
  }
1066
917
  /**
1067
918
  * Parse the location from AclConfig resource.
@@ -1071,8 +922,7 @@ class SampleQueryServiceClient {
1071
922
  * @returns {string} A string representing the location.
1072
923
  */
1073
924
  matchLocationFromAclConfigName(aclConfigName) {
1074
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1075
- .location;
925
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
1076
926
  }
1077
927
  /**
1078
928
  * Return a fully-qualified engine resource name string.
@@ -1154,8 +1004,7 @@ class SampleQueryServiceClient {
1154
1004
  * @returns {string} A string representing the project.
1155
1005
  */
1156
1006
  matchProjectFromEvaluationName(evaluationName) {
1157
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1158
- .project;
1007
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1159
1008
  }
1160
1009
  /**
1161
1010
  * Parse the location from Evaluation resource.
@@ -1165,8 +1014,7 @@ class SampleQueryServiceClient {
1165
1014
  * @returns {string} A string representing the location.
1166
1015
  */
1167
1016
  matchLocationFromEvaluationName(evaluationName) {
1168
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1169
- .location;
1017
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1170
1018
  }
1171
1019
  /**
1172
1020
  * Parse the evaluation from Evaluation resource.
@@ -1176,8 +1024,7 @@ class SampleQueryServiceClient {
1176
1024
  * @returns {string} A string representing the evaluation.
1177
1025
  */
1178
1026
  matchEvaluationFromEvaluationName(evaluationName) {
1179
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1180
- .evaluation;
1027
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1181
1028
  }
1182
1029
  /**
1183
1030
  * Return a fully-qualified project resource name string.
@@ -3244,8 +3091,7 @@ class SampleQueryServiceClient {
3244
3091
  * @returns {string} A string representing the project.
3245
3092
  */
3246
3093
  matchProjectFromSampleQueryName(sampleQueryName) {
3247
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3248
- .project;
3094
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3249
3095
  }
3250
3096
  /**
3251
3097
  * Parse the location from SampleQuery resource.
@@ -3255,8 +3101,7 @@ class SampleQueryServiceClient {
3255
3101
  * @returns {string} A string representing the location.
3256
3102
  */
3257
3103
  matchLocationFromSampleQueryName(sampleQueryName) {
3258
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3259
- .location;
3104
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3260
3105
  }
3261
3106
  /**
3262
3107
  * Parse the sample_query_set from SampleQuery resource.
@@ -3266,8 +3111,7 @@ class SampleQueryServiceClient {
3266
3111
  * @returns {string} A string representing the sample_query_set.
3267
3112
  */
3268
3113
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3269
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3270
- .sample_query_set;
3114
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3271
3115
  }
3272
3116
  /**
3273
3117
  * Parse the sample_query from SampleQuery resource.
@@ -3277,8 +3121,7 @@ class SampleQueryServiceClient {
3277
3121
  * @returns {string} A string representing the sample_query.
3278
3122
  */
3279
3123
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3280
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3281
- .sample_query;
3124
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3282
3125
  }
3283
3126
  /**
3284
3127
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3337,8 +3180,8 @@ class SampleQueryServiceClient {
3337
3180
  this._log.info('ending gRPC channel');
3338
3181
  this._terminated = true;
3339
3182
  stub.close();
3340
- this.locationsClient.close();
3341
- this.operationsClient.close();
3183
+ this.locationsClient.close().catch(err => { throw err; });
3184
+ void this.operationsClient.close();
3342
3185
  });
3343
3186
  }
3344
3187
  return Promise.resolve();